Split building the demo image

This doesn't need to be kept exactly in sync with master
This commit is contained in:
Roland Geider
2023-07-12 12:42:00 +02:00
parent d846e77230
commit 3e4bf03b13
3 changed files with 47 additions and 30 deletions

View File

@@ -1,9 +1,11 @@
name: Build and push base Docker images
# Only build when the dockerfile has changed, otherwise scheduled on the first
# of each month
on:
push:
branches:
- "master"
'- "master"'
paths:
- 'extras/docker/base/Dockerfile'
- '.github/workflows/docker-base.yml'

43
.github/workflows/docker-demo.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
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:
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

View File

@@ -1,5 +1,5 @@
# https://docs.docker.com/build/ci/github-actions/multi-platform/
name: Build and push Docker images
name: Build and push production Docker images
on:
push:
@@ -11,34 +11,6 @@ env:
REGISTRY_IMAGE_ALT: wger/devel
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
build-prod:
name: Build production image
runs-on: ubuntu-latest