mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
b4bb38c7ab
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
name: Docker
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop ]
|
|
|
|
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@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
|
|
|
- name: Generate Docker metadata for ${{ matrix.component }}
|
|
id: meta-data
|
|
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0
|
|
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@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
|
|
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 }}
|