mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
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@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3.6.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: extras/docker/demo/Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: ${{ vars.REGISTRY_REPO }}/demo:latest,${{ vars.REGISTRY_REPO }}/demo:2.4-dev
|