Skip to content

Bump docker/setup-qemu-action from 3 to 4 #10

Bump docker/setup-qemu-action from 3 to 4

Bump docker/setup-qemu-action from 3 to 4 #10

name: (Auto) Create release
on:
pull_request:
types: [closed]
push:
branches:
- release/**
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
release:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/'))
name: Create Release
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Install Task
uses: arduino/setup-task@v2.0.0
with:
version: 3.x
- name: Create and push git tags
id: version
env:
VERSION_SUFFIX: ""
run: |
task lint
task git:set-config
REL_VERSION="$(task version:get)"
echo "REL_VERSION=${REL_VERSION}" >> "$GITHUB_OUTPUT"
full_remote_sha="$(git ls-remote --tags origin "refs/tags/${REL_VERSION}" 2>/dev/null | awk '{print $1}' || true)"
if [ -n "${full_remote_sha}" ]; then
if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
echo "ℹ️ INFO: Full tag '${REL_VERSION}' already exists; skipping tag creation."
else
echo "❌ ERROR: Full tag '${REL_VERSION}' already exists; aborting" >&2
exit 1
fi
else
task version:tag-release
fi
- name: Install Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install QEMU
uses: docker/setup-qemu-action@v4
with:
image: tonistiigi/binfmt:latest
platforms: amd64,arm64
- name: Get Docker commands
env:
VERSION_SUFFIX: ""
run: task docker:cmds
- name: Build and Push
env:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION_SUFFIX: ""
run: task docker:push
- name: Inspect image
env:
VERSION_SUFFIX: ""
run: task docker:push:inspect
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.REL_VERSION }}
name: ${{ steps.version.outputs.REL_VERSION }}
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Docker hub description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
repository: ${{ vars.DOCKER_ORG_NAME }}/${{ github.event.repository.name }}
short-description: ${{ github.event.repository.description }}