hedgedoc/.github/workflows/docker.yml
Tilman Vatteroth c7f318e525 ci: unpin actions
some of the hashes dont exist anymore. but i'm too lazy to look for the new hashes. So i let renovate update them later.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2025-04-20 19:29:05 +02:00

69 lines
2.0 KiB
YAML

# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Docker
on:
push:
branches: [ develop ]
tags: [ v2* ]
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
component: [ 'backend', 'frontend' ]
steps:
- uses: actions/checkout@v4.2.2 # v4.2.2
- name: Generate Docker metadata for ${{ matrix.component }}
id: meta-data
uses: docker/metadata-action@v5.7.0 # v5.5.1
with:
images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ matrix.component }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.6.0 # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.10.0 # v3.6.1
- name: Login to GHCR
uses: docker/login-action@v3.4.0 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6.15.0 # v6.7.0
with:
push: true
file: ${{ matrix.component}}/docker/Dockerfile
tags: ${{ steps.meta-data.outputs.tags }}
labels: ${{ steps.meta-data.outputs.labels }}
cache-from: type=gha
cache-to: type=gha
context: .
build-args: |
BUILD_VERSION=${{ github.event.head_commit.id }}
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
TURBO_API=${{ vars.TURBO_API }}
TURBO_TEAM=${{ vars.TURBO_TEAM }}