1818 - " dependabot/**"
1919 - " gh-readonly-queue/**"
2020 - " renovate/**"
21+ - " t/**"
2122 - " tickets/**"
2223 - " u/**"
23- tags :
24- - " * "
24+ release :
25+ types : [published]
2526
2627jobs :
2728 test :
@@ -45,42 +46,38 @@ jobs:
4546 run : uv run --only-group=tox tox run -e lint,typing,py,coverage-report
4647
4748 build :
48- runs-on : ubuntu-latest
4949 needs : [test]
50- timeout-minutes : 15
50+ uses : lsst-sqre/multiplatform-build-and-push/.github/workflows/build.yaml@v2
51+ secrets : inherit
52+ with :
53+ images : ghcr.io/${{ github.repository }}
5154
5255 # Only do Docker builds of tagged releases and pull requests from ticket
5356 # branches. This will still trigger on pull requests from untrusted
5457 # repositories whose branch names match our tickets/* branch convention,
5558 # but in this case the build will fail with an error since the secret
5659 # won't be set.
5760 if : >
58- github.event_name != 'merge_group'
59- && (startsWith(github.ref, 'refs/tags/')
60- || startsWith(github.head_ref, 'tickets/'))
61-
62- steps :
63- - uses : actions/checkout@v6
64- with :
65- fetch-depth : 0
66-
67- - uses : lsst-sqre/build-and-push-to-ghcr@v1
68- id : build
69- with :
70- image : ${{ github.repository }}
71- github_token : ${{ secrets.GITHUB_TOKEN }}
72-
73- - name : Report result
74- run : |
75- echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }}
61+ (github.event_name == 'release' && github.event.action == 'published')
62+ || (github.event_name != 'merge_group'
63+ && (startsWith(github.head_ref, 'tickets/')
64+ || startsWith(github.head_ref, 't/')))
7665
77- - uses : lsst-sqre/build-and-push-to-ghcr@v1
78- id : build-worker
79- with :
80- dockerfile : Dockerfile.worker
81- image : ${{ github.repository }}-worker
82- github_token : ${{ secrets.GITHUB_TOKEN }}
66+ build-worker :
67+ needs : [test]
68+ uses : lsst-sqre/multiplatform-build-and-push/.github/workflows/build.yaml@v2
69+ secrets : inherit
70+ with :
71+ dockerfile : Dockerfile.worker
72+ images : ghcr.io/${{ github.repository }}-worker
8373
84- - name : Report result
85- run : |
86- echo Pushed ghcr.io/${{ github.repository }}-worker:${{ steps.build-worker.outputs.tag }}
74+ # Only do Docker builds of tagged releases and pull requests from ticket
75+ # branches. This will still trigger on pull requests from untrusted
76+ # repositories whose branch names match our tickets/* branch convention,
77+ # but in this case the build will fail with an error since the secret
78+ # won't be set.
79+ if : >
80+ (github.event_name == 'release' && github.event.action == 'published')
81+ || (github.event_name != 'merge_group'
82+ && (startsWith(github.head_ref, 'tickets/')
83+ || startsWith(github.head_ref, 't/')))
0 commit comments