upstream_image_update #236
This file contains hidden or 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: 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: Free disk space | |
| run: curl -fsSL https://raw.githubusercontent.com/kou/arrow/173e2fee5f6667b7e23f8bc6094936f6c6003039/ci/scripts/util_free_space.sh | bash | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v6 | |
| - | |
| name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| 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@v4 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - | |
| name: Login to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| 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@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| platforms: | | |
| linux/amd64 | |
| linux/arm64 | |
| 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 |