Skip to content

fix: correct schedule event check in generate-release workflow - #3608

Closed
castrojo with Copilot wants to merge 2 commits into
mainfrom
copilot/investigate-publish-issues
Closed

fix: correct schedule event check in generate-release workflow#3608
castrojo with Copilot wants to merge 2 commits into
mainfrom
copilot/investigate-publish-issues

Conversation

Copilot AI commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Description

The generate-release workflow was not creating releases for scheduled Tuesday builds of stable and gts streams. The workflow condition checked github.event.schedule == '0 1 * * TUE', but GitHub Actions doesn't provide a github.event.schedule property—only github.event_name.

Changes

  • Fixed condition in .github/workflows/generate-release.yml line 58
  • Changed from: github.event.schedule == '0 1 * * TUE' || contains(...)
  • Changed to: contains(fromJson('["schedule", "workflow_dispatch", "workflow_call"]'), github.event_name)

Before:

if: contains(fromJson('["gts", "stable"]'), matrix.version) && (github.event.schedule == '0 1 * * TUE' || contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name))

After:

if: contains(fromJson('["gts", "stable"]'), matrix.version) && contains(fromJson('["schedule", "workflow_dispatch", "workflow_call"]'), github.event_name)

Scheduled builds were running successfully but failing to generate releases. Manual triggers were unaffected. Next scheduled changelog generation: Tuesday at 01:00 UTC.

Original prompt

Check the last set of stable and gts published releases. At least stable did not appear to publish or generate a changelog. See if gts is the same.

Use the published information in ghcr.io/ublue-os/bluefin by checking with skopeo.

Then investigate why the builds are not publishing. stable and gts should be publishing on tuesdays and generating changelogs. Changelogs were also not generated, investigate.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

The workflow was checking `github.event.schedule == '0 1 * * TUE'` which compares the schedule string instead of checking if the event type is 'schedule'. This prevented release generation from scheduled builds.

Changed to properly check `github.event_name == 'schedule'` along with workflow_dispatch and workflow_call events.

Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate publishing issues for stable and gts releases fix: correct schedule event check in generate-release workflow Nov 6, 2025
Copilot AI requested a review from castrojo November 6, 2025 12:37
@castrojo

castrojo commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

@copilot This handles the changelog, why didn't gts and stable release on "0 1 * * TUE"?

Copilot AI commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

@copilot This handles the changelog, why didn't gts and stable release on "0 1 * * TUE"?

The builds for gts and stable ARE running on schedule every Tuesday at 1:00 AM UTC - that part is working correctly. However, after the builds complete, the generate-release workflow is called to create the GitHub release and changelog.

The bug is in the release generation step - it checks github.event.schedule == '0 1 * * TUE' which doesn't work because GitHub Actions doesn't provide that property. The fix changes it to check github.event_name == 'schedule' instead.

So the sequence is:

  1. ✅ Tuesday 1 AM: Build workflows trigger on schedule
  2. ✅ Builds complete successfully
  3. ❌ Generate-release is called but skips creating the release due to the buggy condition
  4. ✅ With fix (commit b604a03): Generate-release will properly create releases and changelogs

The images were being built and pushed to GHCR, but the GitHub releases with changelogs weren't being created.

@castrojo

castrojo commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

@copilot i cannot find the stable build on tuesday, show me which skopeo command to run to find it. It looks like it is missing

Copilot AI commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

@copilot i cannot find the stable build on tuesday, show me which skopeo command to run to find it. It looks like it is missing

You're right - the Tuesday stable release IS missing. Here are the skopeo commands to verify:

# List recent stable release tags (weekly releases, not daily builds)
skopeo list-tags docker://ghcr.io/ublue-os/bluefin 2>/dev/null | jq -r '.Tags[] | select(. | startswith("stable-2025")) | select(. | contains("daily") | not)' | sort -r | head -10

# Check when the last stable release was created
skopeo inspect docker://ghcr.io/ublue-os/bluefin:stable-20251029 2>/dev/null | jq -r '.Created'

Results show:

  • Last stable release: stable-20251029 (Oct 29, Tuesday)
  • No stable-20251105 or stable-20251104 exists
  • Daily builds ARE running: stable-daily-42.20251104 exists

The scheduled Tuesday builds at 1:00 AM UTC trigger, but they're not generating the weekly release tags (stable-YYYYMMDD) because the generate-release workflow is skipping the release step due to the bug this PR fixes.

@castrojo
castrojo marked this pull request as ready for review November 6, 2025 12:47
@castrojo
castrojo requested a review from p5 as a code owner November 6, 2025 12:47
Copilot AI review requested due to automatic review settings November 6, 2025 12:47
@dosubot dosubot Bot added the size/XS This PR changes 0-9 lines, ignoring generated files. label Nov 6, 2025
@dosubot

dosubot Bot commented Nov 6, 2025

Copy link
Copy Markdown

Related Documentation

Checked 14 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies the release creation condition in the generate-release.yml workflow by removing the hardcoded schedule time check and instead checking if the workflow was triggered by any schedule event.

Key Changes:

  • Replaced the specific schedule time condition github.event.schedule == '0 1 * * TUE' with a generic event name check for schedule
  • Maintains the same behavior while making the condition more maintainable and less brittle

- name: Create Release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2
if: contains(fromJson('["gts", "stable"]'), matrix.version) && (github.event.schedule == '0 1 * * TUE' || contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name))
if: contains(fromJson('["gts", "stable"]'), matrix.version) && contains(fromJson('["schedule", "workflow_dispatch", "workflow_call"]'), github.event_name)

Copilot AI Nov 6, 2025

Copy link

Choose a reason for hiding this comment

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

The workflow does not have a schedule trigger defined in its on: section (only workflow_call and workflow_dispatch). When this workflow is called via workflow_call from parent workflows that have schedule triggers (like build-image-gts.yml and build-image-stable.yml), github.event_name will be workflow_call, not schedule. The schedule event context is not propagated to called workflows. This condition will never match schedule events, making the change ineffective. Consider either: (1) keeping the original condition that worked by checking the specific schedule, or (2) adding a workflow input parameter to pass schedule context from parent workflows.

Suggested change
if: contains(fromJson('["gts", "stable"]'), matrix.version) && contains(fromJson('["schedule", "workflow_dispatch", "workflow_call"]'), github.event_name)
if: contains(fromJson('["gts", "stable"]'), matrix.version) && contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name)

Copilot uses AI. Check for mistakes.
@castrojo castrojo closed this Nov 6, 2025
@castrojo
castrojo deleted the copilot/investigate-publish-issues branch November 23, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants