Skip to content

feat!: move to quay from dockerhub #11

feat!: move to quay from dockerhub

feat!: move to quay from dockerhub #11

Workflow file for this run

name: alpine-dist
on:
push:
branches: [ main ]
paths:
- '.github/workflows/alpine.yml'
- '!alpine/**'
workflow_dispatch:
repository_dispatch:
types: alpine-build
jobs:
build:
name: Building alpine docker images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist:
- {
name: alpine-3.17,
os: alpine,
symbol: "3.17",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
- {
name: alpine-3.18,
os: alpine,
symbol: "3.18",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
- {
name: alpine-3.19,
os: alpine,
symbol: "3.19",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
- {
name: alpine-3.20,
os: alpine,
symbol: "3.20",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prepare
run: |
DIST_NAME=${{ matrix.dist.name }}
USER_NAME=flameshot-org
REPO_NAME=ci-building
IMAGE_NAME=${{ matrix.dist.os }}/${{ matrix.dist.symbol }}
REGISTRY_NAME=quay.io
TAGS="${REGISTRY_NAME}/${USER_NAME}/${REPO_NAME}:${DIST_NAME}"
echo "build_args=VERSION=${DIST_NAME}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build
uses: docker/build-push-action@v6
with:
context: ./${{ steps.prepare.outputs.image-name }}
file: ./${{ steps.prepare.outputs.image-name }}/Dockerfile
platforms: ${{ matrix.dist.platforms }}
push: ${{ github.event_name != 'pull_request' }}
build-args: ${{ steps.prepare.outputs.build_args }}
tags: ${{ steps.prepare.outputs.tags }}
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
- name: Clear
if: always()
run: |
rm -rf ${HOME}/.docker/config.json