Bump docker/login-action from 2 to 3 #61
Workflow file for this run
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: build | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- Dockerfile | |
- .github/workflows/build.yml | |
- root/** | |
pull_request: | |
branches: | |
- master | |
paths: | |
- Dockerfile | |
- .github/workflows/build.yml | |
- root/** | |
repository_dispatch: | |
types: | |
- upstream_image_update | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
env: | |
TITLE: Mumble Server LDAP | |
GHCR_SLUG: ghcr.io/phasecorex/mumble-server-ldap | |
DOCK_SLUG: docker.io/phasecorex/mumble-server-ldap | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
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@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
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@v4 | |
with: | |
platforms: | | |
linux/amd64 | |
linux/arm/v7 | |
linux/arm64 | |
linux/ppc64le | |
linux/s390x | |
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 |