Release v1.7.0 #29
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: Release Docker image | |
on: | |
release: | |
types: [created] | |
push: | |
branches: [release/*] | |
env: | |
DOCKER_IMAGE: ghcr.io/kereis/traefik-certs-dumper | |
jobs: | |
release: | |
name: Release normal (Docker) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Prepare tags for normal build | |
id: docker_meta | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.DOCKER_IMAGE }} | |
tags: | | |
type=sha | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
flavor: | | |
latest=true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
driver-opts: network=host | |
- name: Cache Docker layers | |
uses: actions/[email protected] | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build image | |
uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
context: . | |
file: ./docker/Dockerfile | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
push: true | |
release-alpine: | |
name: Release Alpine | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Prepare tags for normal build | |
id: docker_meta | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.DOCKER_IMAGE }} | |
tags: | | |
type=sha | |
type=semver,pattern={{version}},suffix=-alpine | |
type=semver,pattern={{major}}.{{minor}},suffix=-alpine | |
type=semver,pattern={{major}},suffix=-alpine | |
alpine | |
flavor: | | |
latest=false | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/[email protected] | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to GitHub Container Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build and publish image | |
uses: docker/build-push-action@v5 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
context: . | |
file: ./alpine/Dockerfile | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
push: ${{ github.event_name == 'release' && github.event.action == 'created' }} |