Skip to content

Commit 7524099

Browse files
committed
Update publish
Signed-off-by: Wade Barnes <wade@neoterictech.ca>
1 parent b30568e commit 7524099

File tree

2 files changed

+39
-53
lines changed

2 files changed

+39
-53
lines changed

.github/workflows/publish-indy.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
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 }})
23
on:
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

2025
env:
21-
INDY_VERSION: 1.16.0
26+
INDY_VERSION: ${{ inputs.indy_version || '1.16.0' }}
2227

2328
jobs:
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

.github/workflows/publish.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
name: Publish ACA-Py
1+
name: Publish ACA-Py Image
2+
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image
23
on:
34
release:
45
types: [released]
6+
57
workflow_dispatch:
68
inputs:
79
tag:
810
description: 'Image tag'
911
required: true
1012
type: string
11-
version:
12-
description: "Version label in image"
13-
required: true
14-
type: string
1513

1614
jobs:
1715
publish-image:
1816
strategy:
1917
fail-fast: false
2018
matrix:
21-
python-version: ['3.7', '3.8', '3.9', '3.10']
19+
python-version: ['3.6', '3.9']
2220

23-
name: Publish
21+
name: Publish ACA-Py Image
2422
runs-on: ubuntu-latest
2523
steps:
2624
- uses: actions/checkout@v3
2725

2826
- name: Gather image info
2927
id: info
3028
run: |
31-
echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}"
29+
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
3230
3331
- name: Cache Docker layers
3432
uses: actions/cache@v3
@@ -39,43 +37,33 @@ jobs:
3937
${{ runner.os }}-buildx-
4038
4139
- name: Set up Docker Buildx
42-
uses: docker/setup-buildx-action@v1
40+
uses: docker/setup-buildx-action@v2
4341

4442
- name: Log in to the GitHub Container Registry
45-
uses: docker/login-action@v1
43+
uses: docker/login-action@v2
4644
with:
4745
registry: ghcr.io
4846
username: ${{ github.repository_owner }}
4947
password: ${{ secrets.GITHUB_TOKEN }}
5048

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'
49+
- name: Setup Image Metadata
6350
id: meta
64-
uses: docker/metadata-action@v4.1.1
51+
uses: docker/metadata-action@v4
6552
with:
6653
images: |
6754
ghcr.io/${{ steps.info.outputs.repo-owner }}/aries-cloudagent-python
6855
tags: |
69-
type=semver,pattern=py${{ matrix.python-version }}-{{version}}
56+
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
7057
7158
- name: Build and Push Image to ghcr.io
7259
uses: docker/build-push-action@v3
7360
with:
7461
push: true
7562
context: .
7663
file: docker/Dockerfile
77-
tags: ${{ steps.dispatch-meta.outputs.tags || steps.meta.outputs.tags }}
64+
tags: ${{ steps.meta.outputs.tags }}
7865
labels: ${{ steps.meta.outputs.labels }}
66+
target: main
7967
build-args: |
8068
python_version=${{ matrix.python-version }}
8169
acapy_version=${{ inputs.version || github.event.release.tag_name }}

0 commit comments

Comments
 (0)