nightly #1338
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 | |
- name: Set date | |
run: echo TODAY=$(date +%Y%m%d) >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2 | |
- name: Login to docker registry | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push image | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4 | |
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: ${{ github.event_name == 'push' }} | |
tags: | | |
${{ env.HEDGEDOC_IMAGE }}:${{ env.TODAY }}-${{ matrix.base }} | |
${{ env.HEDGEDOC_IMAGE }}:${{ matrix.base }} |