Skip to content

feat(ci): distribution building CI #9

feat(ci): distribution building CI

feat(ci): distribution building CI #9

Workflow file for this run

name: release images
on:
push:
tags:
- '*[0-9].*[0-9].*[0-9]*'
jobs:
release-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create and push manifests w/ cache
uses: docker/build-push-action@v2
if: ${{ vars.ENABLE_DOCKER_CACHE }}
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
push: true
tags: ${{ vars.DOCKER_REPOSITORY }}:${{ github.ref_name }}
cache-from: type=registry,ref=${{ vars.DOCKER_REPOSITORY }}:buildcache
cache-to: type=registry,ref=${{ vars.DOCKER_REPOSITORY }}:buildcache,mode=max
- name: Create and push manifests w/o cache
uses: docker/build-push-action@v2
if: ${{ !vars.ENABLE_DOCKER_CACHE }}
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
push: true
tags: ${{ vars.DOCKER_REPOSITORY }}:${{ github.ref_name }}