Skip to content

README: update GitHub Workflow Status badge URLs #61

README: update GitHub Workflow Status badge URLs

README: update GitHub Workflow Status badge URLs #61

name: master-latest
on:
push:
branches: [ master ]
# ignore pushes to .github/workflows/tags.yaml and .github/workflows/test.yaml
paths-ignore:
- ".github/workflows/tags.yaml"
- ".github/workflows/test.yaml"
jobs:
multiarch-to-dockerhub-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions' cache
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Docker Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }} # github username or org
password: ${{ secrets.GITHUB_TOKEN }} # github actions builtin token. repo has to have pkg access.
# the arm64 is of course much slower due to qemu, so build and push amd64 **first**
# due to the way manifests work, the gap between this and the complete push below
# could result in pull failures or inconsistencies for arm64, such is life.
# further duplicated by building both release and debug builds
- name: Build and push amd64 Release Docker Image to DockerHub/GitHub CR
uses: docker/build-push-action@v6
with:
build-args: |
DEBUG_BUILD=0
BASE_IMAGE_SUFFIX=
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64
tags: rpardini/docker-registry-proxy:amd64-latest,ghcr.io/rpardini/docker-registry-proxy:amd64-latest
push: true
- name: Build and push amd64 Debug Docker Image to DockerHub/GitHub CR
uses: docker/build-push-action@v6
with:
build-args: |
DEBUG_BUILD=1
BASE_IMAGE_SUFFIX=-debug
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64
tags: rpardini/docker-registry-proxy:amd64-latest-debug,ghcr.io/rpardini/docker-registry-proxy:amd64-latest-debug
push: true