Publish Images #337
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: Publish Images | |
on: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pkgname: | |
- "makedeb" | |
- "makedeb-beta" | |
- "makedeb-alpha" | |
distro: | |
- "debian:latest" | |
- "debian:buster" | |
- "debian:bullseye" | |
- "debian:bookworm" | |
- "ubuntu:latest" | |
- "ubuntu:rolling" | |
- "ubuntu:bionic" | |
- "ubuntu:focal" | |
- "ubuntu:jammy" | |
- "ubuntu:lunar" | |
- "ubuntu:mantic" | |
- "ubuntu:noble" | |
steps: | |
- name: Checkout repository | |
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 | |
with: | |
driver-opts: | | |
image=moby/buildkit:v0.10.6 | |
- name: Log in to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: kavplex | |
password: ${{ secrets.GH_TOKEN_CUSTOM }} | |
- name: Set up image | |
run: sed -i 's|{{ image }}|${{ matrix.distro }}|g' Dockerfile | |
- name: Get target tag | |
id: tag | |
run: echo "TAG=${{ matrix.distro }}" | sed 's|:|-|' >> "${GITHUB_OUTPUT}" | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: "linux/amd64,linux/arm64" | |
push: true | |
tags: "ghcr.io/makedeb/${{ matrix.pkgname }}:${{ steps.tag.outputs.TAG }}" | |
build-args: | | |
MAKEDEB_PKGNAME=${{ matrix.pkgname }} | |
HW_URL=${{ vars.HW_URL }} |