mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-11-01 19:45:53 +00:00
Bumps the all group with 3 updates: [actions/cache](https://github.com/actions/cache), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/cache` from 4 to 5 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v4...v5) Updates `actions/upload-artifact` from 5 to 6 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) Updates `actions/download-artifact` from 6 to 7 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com>
87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
name: ChangeDetection.io Container Build Test
|
|
|
|
# Triggers the workflow on push or pull request events
|
|
|
|
# This line doesnt work, even tho it is the documented one
|
|
#on: [push, pull_request]
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- requirements.txt
|
|
- Dockerfile
|
|
- .github/workflows/*
|
|
- .github/test/Dockerfile*
|
|
|
|
pull_request:
|
|
paths:
|
|
- requirements.txt
|
|
- Dockerfile
|
|
- .github/workflows/*
|
|
- .github/test/Dockerfile*
|
|
|
|
# Changes to requirements.txt packages and Dockerfile may or may not always be compatible with arm etc, so worth testing
|
|
# @todo: some kind of path filter for requirements.txt and Dockerfile
|
|
jobs:
|
|
builder:
|
|
name: Build ${{ matrix.platform }} (${{ matrix.dockerfile == './Dockerfile' && 'main' || 'alpine' }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# Main Dockerfile platforms
|
|
- platform: linux/amd64
|
|
dockerfile: ./Dockerfile
|
|
- platform: linux/arm64
|
|
dockerfile: ./Dockerfile
|
|
- platform: linux/arm/v7
|
|
dockerfile: ./Dockerfile
|
|
- platform: linux/arm/v8
|
|
dockerfile: ./Dockerfile
|
|
# Alpine Dockerfile platforms (musl via alpine check)
|
|
- platform: linux/amd64
|
|
dockerfile: ./.github/test/Dockerfile-alpine
|
|
- platform: linux/arm64
|
|
dockerfile: ./.github/test/Dockerfile-alpine
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Cache pip packages
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
# Just test that the build works, some libraries won't compile on ARM/rPi etc
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
image: tonistiigi/binfmt:latest
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
install: true
|
|
version: latest
|
|
driver-opts: image=moby/buildkit:master
|
|
|
|
- name: Test that the docker containers can build (${{ matrix.platform }} - ${{ matrix.dockerfile }})
|
|
id: docker_build
|
|
uses: docker/build-push-action@v6
|
|
# https://github.com/docker/build-push-action#customizing
|
|
with:
|
|
context: ./
|
|
file: ${{ matrix.dockerfile }}
|
|
platforms: ${{ matrix.platform }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|