Skip to content

armgit / papra

Public Imported from GitHub
0

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.yaml
index 19d5ecd8..c6ca4d9a 100644
--- a/.github/workflows/release-docker.yaml
+++ b/.github/workflows/release-docker.yaml
@@ -1,9 +1,12 @@
name: Release new versions
on:
- push:
- tags:
- - '@papra/app-server@*'
+ workflow_dispatch:
+ inputs:
+ version:
+ description: 'Version to release'
+ required: true
+ type: string
permissions:
contents: read
@@ -14,9 +17,6 @@ jobs:
name: Release Docker images
runs-on: ubuntu-latest
steps:
- - name: Get release version from tag
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/@papra/app-server@}" >> $GITHUB_ENV
-
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -48,9 +48,9 @@ jobs:
push: true
tags: |
corentinth/papra:latest-root
- corentinth/papra:${{ env.RELEASE_VERSION }}-root
+ corentinth/papra:${{ inputs.version }}-root
ghcr.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 image
uses: docker/build-push-action@v6
@@ -62,7 +62,7 @@ jobs:
tags: |
corentinth/papra:latest
corentinth/papra:latest-rootless
- corentinth/papra:${{ env.RELEASE_VERSION }}-rootless
+ corentinth/papra:${{ inputs.version }}-rootless
ghcr.io/papra-hq/papra:latest
ghcr.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 file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 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 }}