diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7fadd80..f577ed0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,7 @@ name: Publish ACA-Py-Wallet-Upgrade Image run-name: Publish ACA-Py-Wallet-Upgrade ${{ inputs.tag || github.event.release.tag_name }} Image on: release: - types: [released] + types: [published] workflow_dispatch: inputs: @@ -10,6 +10,10 @@ on: description: 'Image tag' required: true type: string + ref: + description: 'Optional - The branch, tag or SHA to checkout.' + required: false + type: string jobs: publish-image: @@ -23,6 +27,8 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref || '' }} - name: Gather image info id: info diff --git a/Dockerfile b/Dockerfile index b3510c6..c7e356f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM --platform=linux/amd64 python:3.10-slim AS base +ARG python_version=3.10 +FROM --platform=linux/amd64 python:${python_version}-slim AS base WORKDIR /usr/src/app -# Install and configure poetry +# Install and configure poetry ENV POETRY_VERSION=1.3.2 ENV POETRY_HOME=/opt/poetry @@ -20,9 +21,10 @@ COPY tests/ tests/ RUN poetry build -FROM --platform=linux/amd64 python:3.10-slim AS askar-upgrade +FROM --platform=linux/amd64 python:${python_version}-slim AS askar-upgrade COPY --from=base /usr/src/app/dist/acapy_wallet_upgrade-*-py3-none-any.whl /tmp/. RUN pip install /tmp/acapy_wallet_upgrade-*-py3-none-any.whl && \ rm /tmp/acapy_wallet_upgrade-* + ENTRYPOINT /bin/bash