mirror of
https://github.com/papra-hq/papra
synced 2026-04-21 13:37:23 +00:00
* refactor(packages): renamed docker package to app * Update .changeset/blue-shoes-stare.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
82 lines
No EOL
2.6 KiB
YAML
82 lines
No EOL
2.6 KiB
YAML
name: Build and publish Docker images
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version to release (e.g. 0.8.2)'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
docker-release:
|
|
name: Build and publish Docker images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Capture build metadata
|
|
id: meta
|
|
run: |
|
|
echo "git_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
|
echo "build_date=$(git show -s --format=%cI HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push root Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./packages/app/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
build-args: |
|
|
PAPRA_VERSION=${{ inputs.version }}
|
|
GIT_COMMIT=${{ steps.meta.outputs.git_commit }}
|
|
BUILD_DATE=${{ steps.meta.outputs.build_date }}
|
|
tags: |
|
|
corentinth/papra:latest-root
|
|
corentinth/papra:${{ inputs.version }}-root
|
|
ghcr.io/papra-hq/papra:latest-root
|
|
ghcr.io/papra-hq/papra:${{ inputs.version }}-root
|
|
|
|
- name: Build and push rootless Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./packages/app/Dockerfile.rootless
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
build-args: |
|
|
PAPRA_VERSION=${{ inputs.version }}
|
|
GIT_COMMIT=${{ steps.meta.outputs.git_commit }}
|
|
BUILD_DATE=${{ steps.meta.outputs.build_date }}
|
|
tags: |
|
|
corentinth/papra:latest
|
|
corentinth/papra:latest-rootless
|
|
corentinth/papra:${{ inputs.version }}-rootless
|
|
ghcr.io/papra-hq/papra:latest
|
|
ghcr.io/papra-hq/papra:latest-rootless
|
|
ghcr.io/papra-hq/papra:${{ inputs.version }}-rootless |