The minimalistic document archiving platform.
chore(release): update Docker release workflow to use version input parameter (#286)
Corentin Thomasset268ac8e35827
diff --git a/.github/workflows/release-docker.yaml b/.github/workflows/release-docker.yamlindex 19d5ecd8..c6ca4d9a 100644--- a/.github/workflows/release-docker.yaml+++ b/.github/workflows/release-docker.yaml@@ -1,9 +1,12 @@name: Release new versionson:- push:- tags:- - '@papra/app-server@*'+ workflow_dispatch:+ inputs:+ version:+ description: 'Version to release'+ required: true+ type: stringpermissions:contents: read@@ -14,9 +17,6 @@ jobs:name: Release Docker imagesruns-on: ubuntu-lateststeps:- - name: Get release version from tag- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/@papra/app-server@}" >> $GITHUB_ENV-- name: Checkoutuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4@@ -48,9 +48,9 @@ jobs:push: truetags: |corentinth/papra:latest-root- corentinth/papra:${{ env.RELEASE_VERSION }}-root+ corentinth/papra:${{ inputs.version }}-rootghcr.io/papra-hq/papra:latest-root- ghcr.io/papra-hq/papra:${{ env.RELEASE_VERSION }}-root+ ghcr.io/papra-hq/papra:${{ inputs.version }}-root- name: Build and push rootless Docker imageuses: docker/build-push-action@v6@@ -62,7 +62,7 @@ jobs:tags: |corentinth/papra:latestcorentinth/papra:latest-rootless- corentinth/papra:${{ env.RELEASE_VERSION }}-rootless+ corentinth/papra:${{ inputs.version }}-rootlessghcr.io/papra-hq/papra:latestghcr.io/papra-hq/papra:latest-rootless- ghcr.io/papra-hq/papra:${{ env.RELEASE_VERSION }}-rootless\ No newline at end of file+ ghcr.io/papra-hq/papra:${{ inputs.version }}-rootless\ No newline at end of filediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex fcae4ca6..c6e54859 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -40,4 +40,13 @@ jobs:title: "chore(release): update versions"env:GITHUB_TOKEN: ${{ secrets.CHANGESET_GITHUB_TOKEN }}- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}\ No newline at end of file+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}++ - name: Trigger Docker build+ if: steps.changesets.outputs.published == 'true' && contains(fromJson(steps.changesets.outputs.publishedPackages).*.name, '@papra/app-server')+ run: |+ VERSION=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[] | select(.name=="@papra/app-server") | .version')+ echo "VERSION: $VERSION"+ gh workflow run release-docker.yaml -f version="$VERSION"+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}