Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/auto-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ on:
push:
branches:
- release/**
workflow_dispatch:

permissions:
contents: write
packages: write

jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
if: >-
github.event_name == 'workflow_dispatch' ||
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job condition allows execution on 'push' events to 'release/**' branches, but there is no check in the condition to handle this trigger type. The condition only checks for 'workflow_dispatch' or merged pull requests starting with 'release/'.

When a push event occurs to a 'release/**' branch, both parts of the OR condition will be false:

  • github.event_name == 'workflow_dispatch' will be false (it's a 'push' event)
  • github.event.pull_request.merged == true will be false (push events don't have pull_request data)

This means the job will never run for push events to release branches, even though they are listed as a trigger. Either remove the push trigger or add it to the condition, such as:

if: >-
  github.event_name == 'workflow_dispatch' ||
  github.event_name == 'push' ||
  (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/'))
Suggested change
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push' ||

Copilot uses AI. Check for mistakes.
(github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/'))
name: Create Release
runs-on: ubuntu-24.04-arm
steps:
Expand All @@ -35,8 +38,20 @@ jobs:
run: |
task lint
task git:set-config
task version:tag-release
echo "REL_VERSION=$(task version:get)" >> "$GITHUB_OUTPUT"
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
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable reference is inconsistent with the GitHub Actions context used elsewhere. On line 18, the code uses github.event_name (the GitHub Actions context), but on line 46, it references ${GITHUB_EVENT_NAME} (an environment variable that is not defined).

In GitHub Actions, github.event_name is available in workflow expressions (like the if condition) but is not automatically available as an environment variable in shell scripts. You should either:

  1. Use ${{ github.event_name }} directly in the shell script
  2. Define GITHUB_EVENT_NAME in the env section and set it to ${{ github.event_name }}

The correct approach would be to use ${{ github.event_name }} in the conditional, like:

if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
Suggested change
if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then

Copilot uses AI. Check for mistakes.
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
Expand Down