Skip to content

upstream_image_update #128

upstream_image_update

upstream_image_update #128

Workflow file for this run

name: build
on:
push:
branches:
- master
paths:
- Dockerfile
- .github/workflows/build.yml
pull_request:
branches:
- master
paths:
- Dockerfile
- .github/workflows/build.yml
repository_dispatch:
types:
- upstream_image_update
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
env:
TITLE: Liquidsoap
GHCR_SLUG: ghcr.io/phasecorex/liquidsoap
DOCK_SLUG: docker.io/phasecorex/liquidsoap
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_SLUG }}
${{ env.DOCK_SLUG }}
labels: |
maintainer=${{ github.repository_owner }}
org.opencontainers.image.vendor=${{ github.repository_owner }}
org.opencontainers.image.title=${{ env.TITLE }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
platforms: |
linux/amd64
linux/arm/v7
linux/arm64
linux/386
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.GHCR_SLUG }}:latest
${{ env.DOCK_SLUG }}:latest
cache-from: |
${{ env.GHCR_SLUG }}:latest
labels: ${{ steps.meta.outputs.labels }}
-
name: Check manifest
if: github.event_name != 'pull_request'
run: |
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:latest
docker buildx imagetools inspect ${{ env.DOCK_SLUG }}:latest
-
name: Check pull
if: github.event_name != 'pull_request'
run: |
docker pull ${{ env.GHCR_SLUG }}:latest
docker image inspect ${{ env.GHCR_SLUG }}:latest
docker pull ${{ env.DOCK_SLUG }}:latest
docker image inspect ${{ env.DOCK_SLUG }}:latest