Skip to content

ci

ci #11

Workflow file for this run

name: ci
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'
schedule:
- cron: "0 1 * * *"
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- debian-version: bookworm
- debian-version: bullseye
- debian-version: bookworm-slim
- debian-version: bullseye-slim
- debian-version: stable
- debian-version: stable-slim
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=registry,ref=yunnysunny/debian:buildcache
cache-to: type=registry,ref=yunnysunny/debian:buildcache,mode=max
tags: |
${{ format('yunnysunny/debian:{0}', matrix.debian-version) }}
yunnysunny/debian:latest
build-args: |
VERSION=${{ matrix.debian-version }}
- name: Update core description
uses: peter-evans/dockerhub-description@v2
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: yunnysunny/debian