@@ -3,8 +3,8 @@ name: release
33on :
44 workflow_dispatch :
55 inputs :
6- package :
7- description : " Package name"
6+ container :
7+ description : " Container image name"
88 required : true
99 default : ' autoconf'
1010 type : choice
1313 - devcontainer
1414 - wasicontainer
1515
16- run-name : " Release: ${{ inputs.package }}"
16+ run-name : " Release: ${{ inputs.container }}${{ inputs.container == 'devcontainer' && ' + wasicontainer' || '' }}"
1717
1818jobs :
19- release-to-ghcr :
20- concurrency :
21- group : release-to-ghcr-${{ inputs.package }}
22- cancel-in-progress : false
23- if : contains('["brettcannon", "corona10", "erlend-aasland"]', github.actor)
19+ authorize :
2420 runs-on : ubuntu-latest
21+ if : contains('["brettcannon", "corona10", "erlend-aasland"]', github.actor)
2522 steps :
26- # Checkout push-to-registry action github repository
27- - name : Set Calver Date
28- run : |
29- echo "builddate=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT
30- id : version
31- - name : Checkout Push to Registry action
32- uses : actions/checkout@v5
33- - name : Set up QEMU
34- uses : docker/setup-qemu-action@v3
35- - name : Set up Docker Buildx
36- uses : docker/setup-buildx-action@v3
37- - name : Login To GHCR
38- uses : docker/login-action@v3
39- with :
40- registry : ghcr.io
41- username : ${{ github.actor }}
42- password : ${{ secrets.GITHUB_TOKEN }}
43- - name : Build and push
44- uses : docker/build-push-action@v6
45- with :
46- context : ./${{ inputs.package }}
47- platforms : linux/amd64,linux/arm64
48- push : true
49- tags : |
50- ghcr.io/python/${{ inputs.package }}:${{ steps.version.outputs.builddate }}.${{ github.run_id }}
51- ghcr.io/python/${{ inputs.package }}:latest
23+ - run : echo "Authorized"
24+
25+ release-to-ghcr :
26+ name : Release ${{ inputs.container }}
27+ needs : authorize
28+ uses : ./.github/workflows/build-and-push.yml
29+ permissions :
30+ contents : read
31+ packages : write
32+ with :
33+ container : ${{ inputs.container }}
34+
35+ release-wasicontainer :
36+ name : Release wasicontainer (due to devcontainer updates)
37+ needs : [authorize, release-to-ghcr]
38+ if : inputs.container == 'devcontainer'
39+ uses : ./.github/workflows/build-and-push.yml
40+ permissions :
41+ contents : read
42+ packages : write
43+ with :
44+ container : wasicontainer
0 commit comments