1- name : Publish ACA-Py (Indy)
1+ name : Publish ACA-Py Image (Indy)
2+ run-name : Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image (Indy ${{ inputs.indy_version || '1.16.0' }})
23on :
34 release :
45 types : [released]
6+
57 workflow_dispatch :
68 inputs :
79 indy_version :
810 description : ' Indy SDK Version'
9- required : false
11+ required : true
12+ default : 1.16.0
1013 type : string
1114 tag :
1215 description : ' Image tag'
1316 required : true
1417 type : string
15- version :
16- description : " Version label in image"
17- required : true
18- type : string
1918
2019env :
21- INDY_VERSION : 1.16.0
20+ INDY_VERSION : ${{ inputs.indy_version || ' 1.16.0' }}
2221
2322jobs :
2423 publish-image :
2524 strategy :
2625 fail-fast : false
2726 matrix :
28- python-version : ['3.7 ', '3.8', '3.9', '3.10 ']
27+ python-version : ['3.6 ', '3.9 ']
2928
30- name : Publish (Indy)
29+ name : Publish ACA-Py Image (Indy)
3130 runs-on : ubuntu-latest
3231 steps :
3332 - uses : actions/checkout@v3
3433
3534 - name : Gather image info
3635 id : info
3736 run : |
38- echo "::set-output name= repo-owner:: ${GITHUB_REPOSITORY_OWNER,,}"
37+ echo "repo-owner= ${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
3938
4039 - name : Cache Docker layers
4140 uses : actions/cache@v3
@@ -46,47 +45,37 @@ jobs:
4645 ${{ runner.os }}-buildx-
4746
4847 - name : Set up Docker Buildx
49- uses : docker/setup-buildx-action@v1
48+ uses : docker/setup-buildx-action@v2
5049
5150 - name : Log in to the GitHub Container Registry
52- uses : docker/login-action@v1
51+ uses : docker/login-action@v2
5352 with :
5453 registry : ghcr.io
5554 username : ${{ github.repository_owner }}
5655 password : ${{ secrets.GITHUB_TOKEN }}
5756
58- - name : Setup Image Metadata (manual)
59- if : github.event_name == 'workflow_dispatch'
60- id : dispatch-meta
61- 62- with :
63- images : |
64- ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
65- tags : |
66- type=raw,value=py${{ matrix.python-version }}-indy-${{ inputs.tag }}
67-
68- - name : Setup Image Metadata (release)
69- if : github.event_name == 'release'
57+ - name : Setup Image Metadata
7058 id : meta
71- uses : docker/metadata-action@v4.1.1
59+ uses : docker/metadata-action@v4
7260 with :
7361 images : |
7462 ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
7563 tags : |
76- type=semver,pattern =py${{ matrix.python-version }}-indy-{{ inputs.indy_version || env.INDY_VERSION }}-{{version }}
64+ type=raw,value =py${{ matrix.python-version }}-indy-$ {{ env.INDY_VERSION }}-${{ inputs.tag || github.event.release.tag_name }}
7765
7866 - name : Build and Push Image to ghcr.io
7967 uses : docker/build-push-action@v3
8068 with :
8169 push : true
8270 context : .
8371 file : docker/Dockerfile.indy
84- tags : ${{ steps.dispatch-meta.outputs.tags || steps.meta.outputs.tags }}
72+ tags : ${{ steps.meta.outputs.tags }}
73+ labels : ${{ steps.meta.outputs.labels }}
8574 target : main
8675 build-args : |
8776 python_version=${{ matrix.python-version }}
88- indy_version=${{ inputs.indy_version || env.INDY_VERSION }}
89- acapy_version=${{ inputs.version || github.event.release.tag_name }}
77+ indy_version=${{ env.INDY_VERSION }}
78+ acapy_version=${{ inputs.tag || github.event.release.tag_name }}
9079 cache-from : type=local,src=/tmp/.buildx-cache
9180 cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
9281
0 commit comments