Workflow file for this run
This file contains hidden or 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: Push Docker Image | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
push-docker-image: | |
name: Push Docker Image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Retrieve major version | |
uses: winterjung/split@v2 | |
id: split | |
with: | |
msg: ${{ github.ref_name }} | |
separator: . | |
- name: Log in to registry | |
uses: docker/login-action@v3 | |
with: | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push the Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ secrets.DOCKERHUB_REPOSITORY }}:${{ github.ref_name }},${{ secrets.DOCKERHUB_REPOSITORY }}:${{ steps.split.outputs._0 }},${{ secrets.DOCKERHUB_REPOSITORY }}:latest |