docker: switch base to debian 12 #49
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 drbd-reactor | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- dockerfiles/drbd-reactor/* | |
- .github/workflows/build-drbd-reactor.yaml | |
pull_request: | |
paths: | |
- dockerfiles/drbd-reactor/* | |
- .github/workflows/build-drbd-reactor.yaml | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare | |
id: prep | |
run: | | |
DOCKERHUB_IMAGE=docker.io/piraeusdatastore/drbd-reactor | |
QUAYIO_IMAGE=quay.io/piraeusdatastore/drbd-reactor | |
cd dockerfiles/drbd-reactor | |
. ./VERSION.env | |
DOCKERHUB_TAG_FULL="${DOCKERHUB_IMAGE}:v${DRBD_REACTOR_VERSION}" | |
DOCKERHUB_TAG_SHORT="${DOCKERHUB_IMAGE}:v${SHORT_VERSION}" | |
DOCKERHUB_TAG_LATEST="${DOCKERHUB_IMAGE}:latest" | |
QUAYIO_TAG_FULL="${QUAYIO_IMAGE}:v${DRBD_REACTOR_VERSION}" | |
QUAYIO_TAG_SHORT="${QUAYIO_IMAGE}:v${SHORT_VERSION}" | |
QUAYIO_TAG_LATEST="${QUAYIO_IMAGE}:latest" | |
TAGS="$DOCKERHUB_TAG_FULL","$DOCKERHUB_TAG_SHORT","$DOCKERHUB_TAG_LATEST","$QUAYIO_TAG_FULL","$QUAYIO_TAG_SHORT","$QUAYIO_TAG_LATEST" | |
# Set output parameters. | |
echo ::set-output name=tags::${TAGS} | |
echo ::set-output name=docker_image::${DOCKERHUB_IMAGE} | |
echo ::set-output name=quay_image::${QUAYIO_IMAGE} | |
echo ::set-output name=drbd_reactor_version::${DRBD_REACTOR_VERSION} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: login to registry | |
if: ${{ github.event_name != 'pull_request' }} | |
env: | |
QUAYIO_USERNAME: ${{ secrets.QUAYIO_USERNAME }} | |
QUAYIO_PASSWORD: ${{ secrets.QUAYIO_PASSWORD }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
run: | | |
docker login --username=${QUAYIO_USERNAME} --password-stdin quay.io <<< "${QUAYIO_PASSWORD}" | |
docker login --username=${DOCKERHUB_USERNAME} --password-stdin docker.io <<< "${DOCKERHUB_PASSWORD}" | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
build-args: | | |
DRBD_REACTOR_VERSION=${{ steps.prep.outputs.drbd_reactor_version }} | |
context: dockerfiles/drbd-reactor | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.prep.outputs.tags }} |