Update archs #7
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: Publish Docker image | |
permissions: | |
contents: read | |
packages: write | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*" | |
env: | |
IMAGE_TAG: docker.io/botsudo/docker-openldap:latest | |
PLATFORM: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le" | |
jobs: | |
push_to_registry: | |
environment: | |
name: Docker Hub | |
url: https://hub.docker.com/r/botsudo/docker-openldap | |
name: Push Docker image to DockerHub and GitHub Container Registry | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }} | |
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }} | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build docker image | |
run: make docker-build | |
env: | |
# See: https://github.com/docker/buildx/issues/59 | |
ACTION: push | |
DOCKER_BUILDKIT: 1 | |
- name: Test docker image | |
run: make test-certificates test | |
# Anyway the image is pushed ... because of the buildx issue | |
continue-on-error: true | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
#- name: Sign and push docker image | |
# uses: sudo-bot/action-docker-sign@latest | |
# with: | |
# image-ref: "docker.io/botsudo/action-docker-compose:latest" | |
# private-key-id: "${{ secrets.DOCKER_PRIVATE_KEY_ID }}" | |
# private-key: ${{ secrets.DOCKER_PRIVATE_KEY }} | |
# private-key-passphrase: ${{ secrets.DOCKER_PRIVATE_KEY_PASSPHRASE }} | |
- name: Pull multi-platform image pushed by Docker buildx | |
run: docker pull $IMAGE_TAG | |
- name: Tag for GHCR | |
run: make docker-tag-ghcr | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to GitHub Container Registry | |
run: make docker-push-ghcr |