Skip to content

Commit

Permalink
feat: disable push for tags: branch and latest when ${{ github.event_…
Browse files Browse the repository at this point in the history
…name == 'schedule' }}
  • Loading branch information
snowdream committed Oct 21, 2024
1 parent 4cc943c commit c9f6e61
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
Expand Down Expand Up @@ -88,25 +88,25 @@ jobs:
prefix=
suffix=
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
type=ref,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name != 'schedule' }},priority=600,prefix=,suffix=,event=branch
type=edge,enable=true,priority=700,prefix=,suffix=,branch=dev
type=raw,enable={{is_default_branch}},priority=200,prefix=,suffix=,value=latest
type=raw,enable=${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=latest
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},priority=200,prefix=,suffix=,value=latest
type=schedule,enable=true,priority=1000,prefix=,suffix=,pattern=nightly
type=match,enable=true,priority=800,prefix=,suffix=,pattern=\d+.\d+.\d+,group=0,value=
type=match,enable=true,priority=800,prefix=,suffix=,pattern=\d+.\d+,group=0,value=
type=match,enable=${{ !startsWith(github.ref, 'refs/tags/0.') && !startsWith(github.ref, 'refs/tags/v0.') && !startsWith(github.ref, 'refs/tags/V0.') && !startsWith(github.ref, 'refs/tags/alpine-0.') && !startsWith(github.ref, 'refs/tags/alpine-v0.') && !startsWith(github.ref, 'refs/tags/alpine-V0.') }},priority=800,prefix=,suffix=,pattern=\d+,group=0,value=
type=ref,enable=true,priority=600,prefix=,suffix=-alpine,event=branch
type=ref,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name != 'schedule' }},priority=600,prefix=,suffix=-alpine,event=branch
type=edge,enable=true,priority=700,prefix=,suffix=-alpine,branch=dev
type=raw,enable={{is_default_branch}},priority=200,prefix=,suffix=,value=alpine
type=raw,enable=${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=alpine
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},priority=200,prefix=,suffix=,value=alpine
type=schedule,enable=true,priority=1000,prefix=,suffix=-alpine,pattern=nightly
type=match,enable=true,priority=800,prefix=,suffix=-alpine,pattern=\d+.\d+.\d+,group=0,value=
type=match,enable=true,priority=800,prefix=,suffix=-alpine,pattern=\d+.\d+,group=0,value=
type=match,enable=${{ !startsWith(github.ref, 'refs/tags/0.') && !startsWith(github.ref, 'refs/tags/v0.') && !startsWith(github.ref, 'refs/tags/V0.') && !startsWith(github.ref, 'refs/tags/alpine-0.') && !startsWith(github.ref, 'refs/tags/alpine-v0.') && !startsWith(github.ref, 'refs/tags/alpine-V0.') }},priority=800,prefix=,suffix=-alpine,pattern=\d+,group=0,value=
type=ref,enable=true,priority=600,prefix=,suffix=-alpine3.20,event=branch
type=ref,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name != 'schedule' }},priority=600,prefix=,suffix=-alpine3.20,event=branch
type=edge,enable=true,priority=700,prefix=,suffix=-alpine3.20,branch=dev
type=raw,enable={{is_default_branch}},priority=200,prefix=,suffix=,value=alpine3.20
type=raw,enable=${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=alpine3.20
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},priority=200,prefix=,suffix=,value=alpine3.20
type=schedule,enable=true,priority=1000,prefix=,suffix=-alpine3.20,pattern=nightly
type=match,enable=true,priority=800,prefix=,suffix=-alpine3.20,pattern=\d+.\d+.\d+,group=0,value=
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
Expand Down Expand Up @@ -88,17 +88,17 @@ jobs:
prefix=
suffix=
tags: |
type=ref,enable=true,priority=600,prefix=,suffix=-debian,event=branch
type=ref,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name != 'schedule' }},priority=600,prefix=,suffix=-debian,event=branch
type=edge,enable=true,priority=700,prefix=,suffix=-debian,branch=dev
type=raw,enable={{is_default_branch}},priority=200,prefix=,suffix=,value=debian
type=raw,enable=${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=debian
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},priority=200,prefix=,suffix=,value=debian
type=schedule,enable=true,priority=1000,prefix=,suffix=-debian,pattern=nightly
type=match,enable=true,priority=800,prefix=,suffix=-debian,pattern=\d+.\d+.\d+,group=0,value=
type=match,enable=true,priority=800,prefix=,suffix=-debian,pattern=\d+.\d+,group=0,value=
type=match,enable=${{ !startsWith(github.ref, 'refs/tags/0.') && !startsWith(github.ref, 'refs/tags/v0.') && !startsWith(github.ref, 'refs/tags/V0.') && !startsWith(github.ref, 'refs/tags/debian-0.') && !startsWith(github.ref, 'refs/tags/debian-v0.') && !startsWith(github.ref, 'refs/tags/debian-V0.') }},priority=800,prefix=,suffix=-debian,pattern=\d+,group=0,value=
type=ref,enable=true,priority=600,prefix=,suffix=-bookworm,event=branch
type=ref,enable=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name != 'schedule' }},priority=600,prefix=,suffix=-bookworm,event=branch
type=edge,enable=true,priority=700,prefix=,suffix=-bookworm,branch=dev
type=raw,enable={{is_default_branch}},priority=200,prefix=,suffix=,value=bookworm
type=raw,enable=${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'schedule' }},priority=200,prefix=,suffix=,value=bookworm
type=raw,enable=${{ startsWith(github.ref, 'refs/tags/') }},priority=200,prefix=,suffix=,value=bookworm
type=schedule,enable=true,priority=1000,prefix=,suffix=-bookworm,pattern=nightly
type=match,enable=true,priority=800,prefix=,suffix=-bookworm,pattern=\d+.\d+.\d+,group=0,value=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
Expand Down

0 comments on commit c9f6e61

Please sign in to comment.