Skip to content

Commit a7fe2c1

Browse files
committed
Update publish
Signed-off-by: Wade Barnes <[email protected]>
1 parent b30568e commit a7fe2c1

File tree

2 files changed

+32
-55
lines changed

2 files changed

+32
-55
lines changed

.github/workflows/publish-indy.yml

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

2019
env:
21-
INDY_VERSION: 1.16.0
20+
INDY_VERSION: ${{ inputs.indy_version || '1.16.0' }}
2221

2322
jobs:
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-
uses: docker/[email protected]
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

.github/workflows/publish.yml

Lines changed: 14 additions & 26 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,46 +37,36 @@ 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/[email protected]
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 }}
81-
acapy_version=${{ inputs.version || github.event.release.tag_name }}
69+
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
8270
cache-from: type=local,src=/tmp/.buildx-cache
8371
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
8472

0 commit comments

Comments
 (0)