0.1.0 #2
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: | |
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 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 |