Skip to content

v1.0.3

v1.0.3 #4

Workflow file for this run

name: Docker Build and Push
on:
release:
types: [created]
jobs:
shellcheck:
uses: ./.github/workflows/check.yml
build-and-push:
needs: shellcheck
runs-on: ubuntu-latest
permissions:
actions: write
packages: write
contents: read
steps:
-
name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login into Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Extract version from release
id: version_tag
run: |
# Extract the version from the release tag, removing any 'v' prefix
VERSION_TAG="${GITHUB_REF#refs/tags/}"
CLEAN_VERSION=$(echo "$VERSION_TAG" | sed 's/^v//')
echo "##[set-output name=version;]${CLEAN_VERSION}"
-
name: Build and push version tag
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/qemu-local:${{ steps.version_tag.outputs.version }}
-
name: Build and push latest tag
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/qemu-local:latest