Skip to content

Workflow file for this run

name: Release docker image
on:
workflow_dispatch: {}
release:
types: [published]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Bump version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine hatch
- name: Versioning package
run: hatch version ${{ github.ref_name }}
# Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: wh1isper
password: ${{ secrets.PAT }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: wh1isper
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image
id: docker_build_publish
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
file: ./docker/Dockerfile
push: true
tags: wh1isper/redis-canal:${{ github.ref_name }}
- name: Build and push image
id: docker_build_publish_matrix_latest
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
file: ./docker/Dockerfile
push: true
tags: wh1isper/redis-canal:latest
- name: Build and push image
id: ghcr_docker_build_publish
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
file: ./docker/Dockerfile
push: true
tags: ghcr.io/wh1isper/redis-canal:${{ github.ref_name }}
- name: Build and push image
id: ghcr_docker_build_publish_matrix_latest
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
file: ./docker/Dockerfile
push: true
tags: ghcr.io/wh1isper/redis-canal:latest