Skip to content

Docker

Docker #58

Workflow file for this run

name: Docker
on:
workflow_run:
workflows: ["Semantic Release"]
branches:
- main
types:
- completed
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0
- name: Get the version
id: get_version
run: |
VERSION=$(git describe --tags --abbrev=0)
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: latest=true
images: |
nickhobart/pvb
tags: |
type=raw,value=${{ env.RELEASE_VERSION }}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up BuildX
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}