fix: add branch check

This commit is contained in:
JustSong 2024-12-27 20:41:20 +08:00
parent d89e9d7e44
commit 4f25cde132
5 changed files with 5 additions and 10 deletions

View File

@ -2,8 +2,6 @@ name: Publish Docker image (English)
on:
push:
branches:
- main
tags:
- 'v*.*.*'
workflow_dispatch:
@ -14,6 +12,7 @@ on:
jobs:
push_to_registries:
name: Push Docker image to multiple registries
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
packages: write

View File

@ -2,8 +2,6 @@ name: Publish Docker image
on:
push:
branches:
- main
tags:
- 'v*.*.*'
workflow_dispatch:
@ -15,6 +13,7 @@ jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
packages: write
contents: read

View File

@ -4,8 +4,6 @@ permissions:
on:
push:
branches:
- main
tags:
- 'v*.*.*'
- '!*-alpha*'
@ -17,6 +15,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3

View File

@ -4,8 +4,6 @@ permissions:
on:
push:
branches:
- main
tags:
- 'v*.*.*'
- '!*-alpha*'
@ -17,6 +15,7 @@ on:
jobs:
release:
runs-on: macos-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3

View File

@ -4,8 +4,6 @@ permissions:
on:
push:
branches:
- main
tags:
- 'v*.*.*'
- '!*-alpha*'
@ -17,6 +15,7 @@ on:
jobs:
release:
runs-on: windows-latest
if: github.ref == 'refs/heads/main'
defaults:
run:
shell: bash