File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 3535 image_name : authorization_jvm_aarch64
3636 image_file : authorization_jvm_aarch64.yaml
3737 runs_on : raspberrypi
38+ push-multi-arch-image-jvm :
39+ needs :
40+ - build-oci-image-jvm-amd64
41+ - build-oci-image-jvm-aarch64
42+ uses : making/oauth2-sso-demo/.github/workflows/push-multi-arch-image.yaml@main
43+ with :
44+ prefix : jvm
45+ pom_dir : authorization
3846 save-image-jvm-amd64 :
3947 needs : build-oci-image-jvm-amd64
4048 uses : making/workflows/.github/workflows/save-images.yaml@main
Original file line number Diff line number Diff line change 1+ name : Push Multi Arch Image
2+ on :
3+ workflow_call :
4+ inputs :
5+ prefix :
6+ required : true
7+ type : string
8+ pom_dir :
9+ required : false
10+ type : string
11+ default : ' .'
12+ target_ref :
13+ required : false
14+ type : string
15+ default : ' refs/heads/main'
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ packages : write
22+ steps :
23+ - uses : actions/checkout@v2
24+ - name : Login to GitHub Container Registry
25+ if : github.ref == inputs.target_ref
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+ - name : docker manifest push
32+ if : github.ref == inputs.target_ref
33+ run : |
34+ docker manifest create ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_${GITHUB_SHA} \
35+ --amend ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_amd64_${GITHUB_SHA} \
36+ --amend ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_aarch64_${GITHUB_SHA}
37+ docker manifest create ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }} \
38+ --amend ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_amd64_${GITHUB_SHA} \
39+ --amend ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_aarch64_${GITHUB_SHA}
40+ docker manifest push ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}_${GITHUB_SHA}
41+ docker manifest push ghcr.io/${{ github.repository }}/${{ inputs.pom_dir }}:${{ inputs.prefix }}
You can’t perform that action at this time.
0 commit comments