Build and push demo Docker image #4
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: Build and push demo Docker image | |
# Only build when the dockerfile has changed, otherwise scheduled every two weeks | |
# (on the 1st and 15th every month) since it's not so important to keep this image | |
# exactly in sync with master | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'extras/docker/demo/Dockerfile' | |
- '.github/workflows/docker-demo.yml' | |
schedule: | |
- cron: '0 6 1,15 * *' | |
jobs: | |
demo: | |
name: Build demo image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2.2.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2.9.0 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2.2.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build image | |
uses: docker/build-push-action@v4.1.0 | |
with: | |
context: . | |
push: true | |
file: extras/docker/demo/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
tags: wger/demo:latest,wger/demo:2.2-dev,wger/apache:latest,wger/apache:2.2-dev |