-
Notifications
You must be signed in to change notification settings - Fork 52
56 lines (49 loc) · 1.66 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: nightly
on:
push:
branches: [main, master]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
cancel-in-progress: true
jobs:
nightly:
runs-on: ubuntu-latest
strategy:
matrix:
base: [debian, alpine]
env:
HEDGEDOC_VERSION: master
HEDGEDOC_IMAGE: quay.io/hedgedoc/hedgedoc-nightly
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set date
run: echo TODAY=$(date +%Y%m%d) >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
- name: Login to docker registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: quay.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push image
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6
with:
context: .
file: ./${{ matrix.base }}/Dockerfile
labels: quay.expires-after=1w
cache-from: type=gha
cache-to: type=gha
build-args: |
VERSION=${{ env.HEDGEDOC_VERSION }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.HEDGEDOC_IMAGE }}:${{ env.TODAY }}-${{ matrix.base }}
${{ env.HEDGEDOC_IMAGE }}:${{ matrix.base }}