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 }})
23on :
34 release :
45 types : [released]
6+ inputs :
7+ indy_version :
8+ description : ' Indy SDK Version'
9+ required : true
10+ default : 1.16.0
11+ type : string
12+
513 workflow_dispatch :
614 inputs :
715 indy_version :
816 description : ' Indy SDK Version'
9- required : false
17+ required : true
18+ default : 1.16.0
1019 type : string
1120 tag :
1221 description : ' Image tag'
1322 required : true
1423 type : string
15- version :
16- description : " Version label in image"
17- required : true
18- type : string
1924
2025env :
21- INDY_VERSION : 1.16.0
26+ INDY_VERSION : ${{ inputs.indy_version || ' 1.16.0' }}
2227
2328jobs :
2429 publish-image :
2530 strategy :
2631 fail-fast : false
2732 matrix :
28- python-version : ['3.7 ', '3.8', '3.9', '3.10 ']
33+ python-version : ['3.6 ', '3.9 ']
2934
30- name : Publish (Indy)
35+ name : Publish ACA-Py Image (Indy)
3136 runs-on : ubuntu-latest
3237 steps :
3338 - uses : actions/checkout@v3
3439
3540 - name : Gather image info
3641 id : info
42+ # env:
43+ # GITHUB_CONTEXT: ${{ toJson(github) }}
3744 run : |
38- echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}"
45+ echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
46+ # echo "${GITHUB_CONTEXT}"
3947
4048 - name : Cache Docker layers
4149 uses : actions/cache@v3
@@ -46,46 +54,36 @@ jobs:
4654 ${{ runner.os }}-buildx-
4755
4856 - name : Set up Docker Buildx
49- uses : docker/setup-buildx-action@v1
57+ uses : docker/setup-buildx-action@v2
5058
5159 - name : Log in to the GitHub Container Registry
52- uses : docker/login-action@v1
60+ uses : docker/login-action@v2
5361 with :
5462 registry : ghcr.io
5563 username : ${{ github.repository_owner }}
5664 password : ${{ secrets.GITHUB_TOKEN }}
5765
58- - name : Setup Image Metadata (manual)
59- if : github.event_name == 'workflow_dispatch'
60- id : dispatch-meta
61- uses : docker/metadata-action@v4.1.1
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'
66+ - name : Setup Image Metadata
7067 id : meta
71- uses : docker/metadata-action@v4.1.1
68+ uses : docker/metadata-action@v4
7269 with :
7370 images : |
7471 ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
7572 tags : |
76- type=semver,pattern =py${{ matrix.python-version }}-indy-{{ inputs.indy_version || env.INDY_VERSION }}-{{version }}
73+ type=raw,value =py${{ matrix.python-version }}-indy-$ {{ env.INDY_VERSION }}-${{ inputs.tag || github.event.release.tag_name }}
7774
7875 - name : Build and Push Image to ghcr.io
7976 uses : docker/build-push-action@v3
8077 with :
8178 push : true
8279 context : .
8380 file : docker/Dockerfile.indy
84- tags : ${{ steps.dispatch-meta.outputs.tags || steps.meta.outputs.tags }}
81+ tags : ${{ steps.meta.outputs.tags }}
82+ labels : ${{ steps.meta.outputs.labels }}
8583 target : main
8684 build-args : |
8785 python_version=${{ matrix.python-version }}
88- indy_version=${{ inputs.indy_version || env.INDY_VERSION }}
86+ indy_version=${{ env.INDY_VERSION }}
8987 acapy_version=${{ inputs.version || github.event.release.tag_name }}
9088 cache-from : type=local,src=/tmp/.buildx-cache
9189 cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
0 commit comments