Skip to content

feat: update action-tag to use action pins mode (gh-aw-actions) with v0#20991

Merged
pelikhan merged 4 commits intomainfrom
copilot/update-action-tag-to-v0
Mar 14, 2026
Merged

feat: update action-tag to use action pins mode (gh-aw-actions) with v0#20991
pelikhan merged 4 commits intomainfrom
copilot/update-action-tag-to-v0

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

Summary

Updates the action-tag frontmatter feature to use the action pins mode (github/gh-aw-actions) instead of the release mode (github/gh-aw), sets action-tag: "v0" in the daily-fact agentic workflow, and enables inlined-imports for the daily-fact workflow.

Changes

pkg/workflow/features_validation.go

  • Extended validateActionTag to accept version tags (e.g., v0, v1, v1.0.0) in addition to full 40-char commit SHAs

pkg/workflow/semver.go

  • Moved versionTagRegex and isValidVersionTag here (from features_validation.go)
  • Restricted version tag support to vmajor, vmajor.minor, and vmajor.minor.patch formats only

pkg/workflow/action_reference.go

  • Changed resolveActionReference so that when action-tag is set in frontmatter features, it uses action mode behavior (github/gh-aw-actions) instead of release mode (github/gh-aw)
  • For ./actions/setup, passes the frontmatter tag to ResolveSetupActionReference with ActionModeAction
  • For all other actions, routes to convertToExternalActionsRef

.github/workflows/daily-fact.md

  • Updated action-tag from a70c5eada06553e3510ac27f2c3bda9d3705bccb to "v0"
  • Added inlined-imports: true so the prompt content is baked directly into the compiled YAML

.github/workflows/daily-fact.lock.yml

  • Recompiled: now uses github/gh-aw-actions/setup@v0 and has the prompt content inlined

Tests

  • features_validation_test.go: Updated/added test cases for version tag validation
  • action_reference_test.go: Updated expectations for frontmatter action-tag to use github/gh-aw-actions
  • semver_test.go: Added TestIsValidVersionTag covering valid and invalid version tag formats

Security

  • CodeQL: 0 alerts

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 2 commits March 14, 2026 21:32
…v0 tag

- validateActionTag now accepts version tags (v0, v1, v1.0.0) in addition to full SHAs
- resolveActionReference uses action mode (github/gh-aw-actions) when frontmatter action-tag is set
- daily-fact.md updated to use action-tag: "v0"
- Recompiled daily-fact.lock.yml: now uses github/gh-aw-actions/setup@v0

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
var shaRegex = regexp.MustCompile("^[0-9a-f]{40}$")

// versionTagRegex matches version tags like "v0", "v1", "v1.0", "v1.0.0", etc.
var versionTagRegex = regexp.MustCompile(`^v[0-9]+(\.[0-9]+)*$`)
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot move version parsing to semver.go . onlyu support vmajor vmajor.minor vmajor.minor.patch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in af06d0d. Moved versionTagRegex and isValidVersionTag to semver.go, and tightened the regex to only support vmajor, vmajor.minor, and vmajor.minor.patch (e.g. v0, v1.2, v1.2.3). Added TestIsValidVersionTag to semver_test.go.

…major.minor/vmajor.minor.patch

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan March 14, 2026 22:01
@pelikhan pelikhan marked this pull request as ready for review March 14, 2026 22:02
Copilot AI review requested due to automatic review settings March 14, 2026 22:02
@pelikhan
Copy link
Contributor

@copilot update daily-facts to use inlined-prompts.

@pelikhan
Copy link
Contributor

inlined imports

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the action-tag frontmatter feature to support version tags (e.g. v0) and to resolve actions via the external action pins repository (github/gh-aw-actions) rather than the internal release repo (github/gh-aw), and applies this to the daily-fact workflow.

Changes:

  • Extend action-tag validation to accept semver-like tags (v0, v1, v1.0.0) in addition to full 40-char commit SHAs.
  • Update action reference resolution so frontmatter action-tag forces action mode behavior (external github/gh-aw-actions refs).
  • Update daily-fact workflow configuration + lock/pins data to use action-tag: "v0" and pin github/gh-aw-actions/setup@v0.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/workflow/semver.go Adds version-tag regex + helper used by feature validation.
pkg/workflow/semver_test.go Adds unit tests for version-tag validation helper.
pkg/workflow/features_validation.go Allows action-tag to be a full SHA or version tag.
pkg/workflow/features_validation_test.go Updates validation tests for version tags and new error messaging.
pkg/workflow/action_reference.go Routes frontmatter action-tag to external gh-aw-actions action-mode behavior.
pkg/workflow/action_reference_test.go Updates expectations for action-tag to use github/gh-aw-actions.
pkg/workflow/data/action_pins.json Adds pin entry for github/gh-aw-actions/setup@v0.
.github/aw/actions-lock.json Mirrors the new gh-aw-actions/setup@v0 pin in the repo lock JSON.
.github/workflows/daily-fact.md Switches workflow frontmatter action-tag from a SHA to "v0".
.github/workflows/daily-fact.lock.yml Recompiled lock output to use github/gh-aw-actions/setup pinned to the v0 SHA.
Comments suppressed due to low confidence (2)

pkg/workflow/action_reference_test.go:165

  • This test uses a short SHA (abc123def456789) as a frontmatter action-tag, but feature validation now requires either a full 40-character commit SHA or a version tag. Consider replacing this with a full 40-char SHA (lowercase hex) or a version tag to keep the test aligned with validated inputs.
			localPath:   "./actions/setup",
			version:     "v1.0.0",
			actionTag:   "abc123def456789",
			expectedRef: "github/gh-aw-actions/setup@abc123def456789",
			description: "Frontmatter action-tag SHA should use action mode (gh-aw-actions)",

pkg/workflow/action_reference_test.go:174

  • Same as above: this scenario uses frontmatter action-tag: "latest", which is no longer a valid value under validateActionTag. Using a valid tag here will prevent the test suite from documenting unsupported configurations.
			localPath:   "./actions/setup",
			version:     "v1.0.0",
			actionTag:   "latest",
			expectedRef: "github/gh-aw-actions/setup@latest",
			description: "Dev mode with frontmatter action-tag should use action mode (gh-aw-actions)",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 152 to +156
localPath: "./actions/setup",
version: "v1.0.0",
actionTag: "latest",
expectedRef: "github/gh-aw/actions/setup@latest",
description: "Release mode with action-tag should use action-tag instead of version",
expectedRef: "github/gh-aw-actions/setup@latest",
description: "Frontmatter action-tag should use action mode (gh-aw-actions) regardless of compiler mode",
Comment on lines +11 to +20
// versionTagRegex matches version tags: vmajor, vmajor.minor, or vmajor.minor.patch
var versionTagRegex = regexp.MustCompile(`^v[0-9]+(\.[0-9]+(\.[0-9]+)?)?$`)

var semverLog = logger.New("workflow:semver")

// isValidVersionTag checks if a string is a valid action version tag.
// Supports vmajor, vmajor.minor, and vmajor.minor.patch formats only.
func isValidVersionTag(s string) bool {
return versionTagRegex.MatchString(s)
}
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 14, 2026

@copilot update daily-facts to use inlined-prompts.

Done in 32725ba. Added inlined-imports: true to daily-fact.md — the prompt content is now baked directly into the compiled YAML instead of being referenced via {{#runtime-import .github/workflows/daily-fact.md}} at runtime.

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.

3 participants