Skip to content

Commit 0d50a15

Browse files
DEV-405: Only release on main branch workflow_run
1 parent 32f3dc0 commit 0d50a15

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ on:
66
- published
77
workflow_dispatch:
88
workflow_run:
9-
workflows:
10-
- Build
11-
types:
12-
- completed
9+
workflows: ["Build"]
10+
types: ["completed"]
11+
branches:
12+
- main
1313

1414
env:
1515
REGISTRY: ghcr.io
1616

1717
jobs:
1818
setup:
19-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
2019
runs-on: ubuntu-latest
2120
steps:
22-
# See https://github.com/docker/build-push-action/blob/v2.10.0/TROUBLESHOOTING.md#repository-name-must-be-lowercase
2321
- name: Sanitize image name
2422
uses: actions/github-script@v6
2523
id: image-name
@@ -36,9 +34,9 @@ jobs:
3634
build_image: ${{ steps.image-name.outputs.result }}:${{ env.SHORT_SHA }}
3735

3836
push:
39-
needs: setup
4037
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
4138
runs-on: ubuntu-latest
39+
needs: setup
4240
permissions:
4341
packages: write
4442
env:

0 commit comments

Comments
 (0)