upgrade build environment to alpine 3.20 #25
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: Deploy multi-architecture Docker images for chown with buildx | |
on: | |
pull_request: | |
branches: master | |
push: | |
branches: master | |
tags: '*' | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare | |
id: prepare | |
run: | | |
IMAGE=privatebin/chown | |
QEMU_PLATFORMS=linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | |
VERSION=${GITHUB_REF##*/} | |
echo "buildx_args=--tag ${IMAGE}:latest \ | |
--tag ${IMAGE}:${VERSION} \ | |
--platform linux/amd64,linux/386,${QEMU_PLATFORMS} ." >> $GITHUB_OUTPUT | |
echo "qemu_platforms=${QEMU_PLATFORMS}" >> $GITHUB_OUTPUT | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: ${{ steps.prepare.outputs.qemu_platforms }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
install: true | |
- name: Docker Build | |
run: | | |
docker build --no-cache --pull --output "type=image,push=false" --build-arg "RELEASE=${{ steps.prepare.outputs.version }}" ${{ steps.prepare.outputs.buildx_args }} | |
- name: Docker Login | |
if: success() && github.event_name != 'pull_request' && github.ref != 'refs/heads/master' | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
printenv DOCKER_PASSWORD | docker login --username "${DOCKER_USERNAME}" --password-stdin | |
- name: Docker Push | |
if: success() && github.event_name != 'pull_request' && github.ref != 'refs/heads/master' | |
run: | | |
docker build --output "type=image,push=true" --build-arg "RELEASE=${{ steps.prepare.outputs.version }}" ${{ steps.prepare.outputs.buildx_args }} | |
- name: Cleanup | |
if: always() && github.event_name != 'pull_request' && github.ref != 'refs/heads/master' | |
run: | | |
rm -f ${HOME}/.docker/config.json |