Skip to content

ci: start autorelease-tag only after a successful update run - #265

Merged
dwisiswant0 merged 1 commit into
mainfrom
workflow-run-guard
Nov 4, 2026
Merged

dwisiswant0 merged 1 commit into
mainfrom
workflow-run-guard

Conversation

@Mzack9999

Copy link
Copy Markdown
Member

Closes #264.

  • autorelease-tag.yml: the workflow_run trigger has branches: [main]. The job runs on other events as before, and on workflow_run only when the source run passed, is from this repository and main, was scheduled or manual, and has the file .github/workflows/useragent-update.yml.
  • Workflow permissions: contents: write (it creates a tag and a release).
  • Actions are pinned to a full SHA (version in a comment). The versions do not change.

Checks:

  • actionlint 3 before, 3 after. zizmor 7 before, 3 after. What stays: dangerous-triggers (the workflow_run trigger itself) and old findings in lines that this PR does not change.
  • The guard, evaluated against 8 cases (scheduled, manual, failed, fork PR, same-repo PR, other branch, other file with the same name): all as expected. The old file starts the job in 5 of them.

Behaviour change: The update workflow failed on each scheduled run since at least 2026-09-27. The release workflow still ran after each failure. With this change, no automatic release happens until the update workflow passes again. Start "🔖 Tag Release" by hand to release in the meantime.

@dwisiswant0
dwisiswant0 merged commit e0df499 into main Nov 4, 2026
@dwisiswant0
dwisiswant0 deleted the workflow-run-guard branch November 4, 2026 23:36
dwisiswant0 added a commit that referenced this pull request Nov 20, 2026
Replace the copied tag-and-release steps with a call to auto-release
from projectdiscovery/workflows, so a fix to the release pipeline
reaches every repository that calls it.

auto-release tags and releases only when files outside .github changed
since the latest v* tag, so empty commits and commits that touch only
.github no longer produce a release. Releases are named after the tag
and get GitHub's generated notes, and the archived
actions/create-release is no longer used.

The call is pinned to v1.0.0 by commit SHA because this job runs with
contents: write from workflow_run, as #265 pinned the actions it
replaces. The pin covers only auto-release.yaml, and this repository
gets auto-release fixes only when the pin is bumped. Dependabot does not
update GitHub Actions here, so the pin has to be bumped by hand.

Closes: #271
Refs: projectdiscovery/workflows#9
Signed-off-by: Dwi Siswanto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autorelease-tag.yml starts after any run named "💡User-Agent Update"

2 participants