Skip to content

Commit 736294a

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

2 files changed

Lines changed: 14 additions & 25 deletions

File tree

.github/workflows/publish-indy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ['3.7', '3.8', '3.9', '3.10']
28+
python-version: ['3.8', '3.9']
2929

3030
name: Publish (Indy)
3131
runs-on: ubuntu-latest
@@ -35,7 +35,7 @@ jobs:
3535
- name: Gather image info
3636
id: info
3737
run: |
38-
echo "::set-output name=repo-owner::${GITHUB_REPOSITORY_OWNER,,}"
38+
echo "repo-owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
3939
4040
- name: Cache Docker layers
4141
uses: actions/cache@v3

.github/workflows/publish.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@ name: Publish ACA-Py
22
on:
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

1613
jobs:
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
@@ -27,8 +24,11 @@ jobs:
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

Comments
 (0)