@@ -2,23 +2,20 @@ name: Publish ACA-Py
22on :
33 release :
44 types : [released]
5+
56 workflow_dispatch :
67 inputs :
78 tag :
89 description : ' Image tag'
910 required : true
1011 type : string
11- version :
12- description : " Version label in image"
13- required : true
14- type : string
1512
1613jobs :
1714 publish-image :
1815 strategy :
1916 fail-fast : false
2017 matrix :
21- python-version : ['3.7', '3. 8', '3.9', '3.10 ']
18+ python-version : ['3.8', '3.9']
2219
2320 name : Publish
2421 runs-on : ubuntu-latest
2724
2825 - name : Gather image info
2926 id : info
27+ # env:
28+ # GITHUB_CONTEXT: ${{ toJson(github) }}
3029 run : |
31- echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}"
30+ echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
31+ # echo "${GITHUB_CONTEXT}"
3232
3333 - name : Cache Docker layers
3434 uses : actions/cache@v3
@@ -39,42 +39,31 @@ jobs:
3939 ${{ runner.os }}-buildx-
4040
4141 - name : Set up Docker Buildx
42- uses : docker/setup-buildx-action@v1
42+ uses : docker/setup-buildx-action@v2
4343
4444 - name : Log in to the GitHub Container Registry
45- uses : docker/login-action@v1
45+ uses : docker/login-action@v2
4646 with :
4747 registry : ghcr.io
4848 username : ${{ github.repository_owner }}
4949 password : ${{ secrets.GITHUB_TOKEN }}
5050
51- - name : Setup Image Metadata (manual)
52- if : github.event_name == 'workflow_dispatch'
53- id : dispatch-meta
54- uses : docker/metadata-action@v4.1.1
55- with :
56- images : |
57- ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
58- tags : |
59- type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag }}
60-
61- - name : Setup Image Metadata (release)
62- if : github.event_name == 'release'
51+ - name : Setup Image Metadata
6352 id : meta
64- uses : docker/metadata-action@v4.1.1
53+ uses : docker/metadata-action@v4
6554 with :
6655 images : |
6756 ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
6857 tags : |
69- type=semver,pattern =py${{ matrix.python-version }}-{{version }}
58+ type=raw,value =py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
7059
7160 - name : Build and Push Image to ghcr.io
7261 uses : docker/build-push-action@v3
7362 with :
7463 push : true
7564 context : .
7665 file : docker/Dockerfile
77- tags : ${{ steps.dispatch-meta.outputs.tags || steps. meta.outputs.tags }}
66+ tags : ${{ steps.meta.outputs.tags }}
7867 labels : ${{ steps.meta.outputs.labels }}
7968 build-args : |
8069 python_version=${{ matrix.python-version }}
0 commit comments