Skip to content

Publish ACA-Py 1.3.1rc0 Image #94

Publish ACA-Py 1.3.1rc0 Image

Publish ACA-Py 1.3.1rc0 Image #94

Workflow file for this run

name: Publish ACA-Py Image
run-name: Publish ACA-Py ${{ inputs.tag || github.event.release.tag_name }} Image
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Image tag
required: true
type: string
ref:
description: Optional - The branch, tag or SHA to checkout.
required: false
type: string
workflow_call:
inputs:
tag:
required: true
type: string
ref:
required: false
type: string
permissions:
contents: read
jobs:
build-image:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
arch: ["amd64", "arm64"]
include:
- arch: amd64
runs-on: ubuntu-24.04
- arch: arm64
runs-on: ubuntu-24.04-arm
name: Build ACA-Py Image
runs-on: ${{ matrix.runs-on }}
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || '' }}
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
with:
cache-binary: false
install: true
version: latest
- name: Build and Cache Image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
push: false
context: .
file: docker/Dockerfile
build-args: |
python_version=${{ matrix.python-version }}
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
cache-from: type=gha,scope=acapy-agent-${{ matrix.arch }}
cache-to: type=gha,scope=acapy-agent-${{ matrix.arch }},mode=max
platforms: linux/${{ matrix.arch }}
publish-images:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
image-type: ["standard", "bbs"]
include:
- image-type: standard
image-name: acapy-agent
# linux/386 platform support has been disabled pending a permanent fix for https://github.com/openwallet-foundation/acapy/issues/2124
# platforms: linux/amd64,linux/arm64,linux/386
platforms: linux/amd64,linux/arm64
acapy-reqs: ""
- image-type: bbs
image-name: acapy-agent-bbs
# Because of BBS, only linux/amd64 is supported for the extended image
# https://github.com/openwallet-foundation/acapy/issues/2124#issuecomment-2293569659
platforms: linux/amd64
acapy-reqs: "[askar,bbs,didcommv2]"
name: Publish ACA-Py ${{ matrix.image-type == 'bbs' && 'BBS ' || '' }} Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build-image
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || '' }}
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
with:
cache-binary: false
install: true
version: latest
- name: Log in to the GitHub Container Registry
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Ensure the repo owner is lowercase for the image name
- name: Lowercase Repo Owner
id: lower
run: echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
- name: Setup Image Metadata
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: |
ghcr.io/${{ steps.lower.outputs.owner }}/${{ matrix.image-name }}
tags: |
type=raw,value=py${{ matrix.python-version }}-${{ inputs.tag || github.event.release.tag_name }}
- name: Publish Image to GHCR.io
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
push: true
context: .
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
python_version=${{ matrix.python-version }}
acapy_version=${{ inputs.tag || github.event.release.tag_name }}
${{ matrix.image-type == 'bbs' && 'acapy_name=acapy-agent-bbs' || '' }}
${{ matrix.acapy-reqs != '' && format('acapy_reqs={0}', matrix.acapy-reqs) || '' }}
cache-from: |
${{ matrix.image-type == 'standard' && 'type=gha,scope=acapy-agent-arm64' || '' }}
${{ matrix.image-type == 'standard' && 'type=gha,scope=acapy-agent-amd64' || '' }}
${{ matrix.image-type == 'bbs' && 'type=gha,scope=acapy-agent-bbs' || ''}}
cache-to: ${{ matrix.image-type == 'bbs' && 'type=gha,scope=acapy-agent-bbs,mode=max' || '' }}
platforms: ${{ matrix.platforms }}