Skip to content

Conversation

@vaind
Copy link
Contributor

@vaind vaind commented Sep 19, 2025

Summary

  • Replace manual _workflow_version input parameters with automatic detection from GITHUB_WORKFLOW_REF
  • Updated both danger and updater workflows to use the same reference that the workflow itself was called with
  • Eliminates potential version mismatches and simplifies workflow usage

Changes

  • Danger workflow: Extract ref from GITHUB_WORKFLOW_REF to download dangerfile.js and utilities
  • Updater workflow: Extract ref from GITHUB_WORKFLOW_REF to checkout workflow scripts
  • Test workflows: Remove _workflow_version parameters since they're no longer needed

Benefits

  • Automatically uses the correct workflow reference without manual input
  • Works seamlessly with PRs, branches, and tags
  • Prevents mismatches between workflow version and script versions
  • Cleaner workflow interface

🤖 Generated with Claude Code

@vaind vaind changed the title chore/danger-workflow-download Use GITHUB_WORKFLOW_REF instead of _workflow_version input Sep 19, 2025
vaind and others added 4 commits September 19, 2025 21:51
Automatically determines the workflow reference from GITHUB_WORKFLOW_REF
instead of requiring manual _workflow_version input parameter.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove _workflow_version input parameter and automatically determine
the workflow reference from GITHUB_WORKFLOW_REF instead.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vaind vaind changed the title Use GITHUB_WORKFLOW_REF instead of _workflow_version input fix: Use GITHUB_WORKFLOW_REF instead of _workflow_version input Sep 19, 2025
…ut step

The workflow was failing because it used shell syntax (bash) in a PowerShell context.
Converted the shell commands to proper PowerShell equivalents:
- Variable assignment using PowerShell syntax
- mkdir -> New-Item with -Force flag
- cd -> Set-Location
- regex replacement using PowerShell -replace operator

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vaind vaind marked this pull request as ready for review September 19, 2025 21:53
@vaind vaind merged commit bdf2970 into main Sep 19, 2025
24 checks passed
@vaind vaind deleted the vaind-patch-1 branch September 19, 2025 22:00
vaind added a commit that referenced this pull request Sep 22, 2025
vaind added a commit that referenced this pull request Sep 22, 2025
…OW_REF (#111)

* Revert "fix: Use GITHUB_WORKFLOW_REF instead of _workflow_version input (#109)"

This reverts commit bdf2970.

* feat: Add PowerShell script for Craft release version updates

Adds automated version management for Craft releases:
- Creates scripts/update-version.ps1 to update _workflow_version defaults
- Updates .craft.yml to use the script in preReleaseCommand
- Script automatically updates danger.yml and updater.yml workflow defaults

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Update default workflow version to 2.14.1 in danger and updater workflows

* fix: Add proper YAML quoting to version update script

Ensures the PowerShell script properly quotes version values in YAML
to maintain valid syntax when updating _workflow_version defaults.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Add changelog entry for Craft automation and workflow fix

Documents the addition of PowerShell version update script and the
revert from GITHUB_WORKFLOW_REF back to _workflow_version parameter.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Update changelog entry to clarify GITHUB_WORKFLOW_REF issue

The core problem is that script download URLs cannot use GITHUB_WORKFLOW_REF
when workflows are called from other repositories.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Simplify changelog entry to focus on the core fix

Remove implementation details about Craft automation and focus on the
main issue: GITHUB_WORKFLOW_REF cannot be used for script download URLs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants