diff --git a/.changeset/patch-update-apm-action-version.md b/.changeset/patch-update-apm-action-version.md new file mode 100644 index 0000000000..aa774b4ffe --- /dev/null +++ b/.changeset/patch-update-apm-action-version.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Updated `microsoft/apm-action` to `v1.4.1` and wired `DefaultAPMActionVersion` into APM dependency pin resolution to fix `GITHUB_TOKEN` handling for cross-org private repository installs. diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index d52621b08c..e242badd29 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -163,11 +163,6 @@ "version": "v2.10.3", "sha": "9cd1b7bf3f36d5a3c3b17abc3545bfb5481912ea" }, - "microsoft/apm-action@v1.4.0": { - "repo": "microsoft/apm-action", - "version": "v1.4.0", - "sha": "cc84c04bc73e19e35527f1efa34ea003be9f037f" - }, "oven-sh/setup-bun@v2.2.0": { "repo": "oven-sh/setup-bun", "version": "v2.2.0", @@ -182,6 +177,11 @@ "repo": "super-linter/super-linter", "version": "v8.5.0", "sha": "61abc07d755095a68f4987d1c2c3d1d64408f1f9" + }, + "microsoft/apm-action@v1.4.1": { + "repo": "microsoft/apm-action", + "version": "v1.4.1", + "sha": "a190b0b1a91031057144dc136acf9757a59c9e4d" } } } diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index c1f2d6ab02..db5119b6a8 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -2243,7 +2243,7 @@ jobs: steps: - name: Install and pack APM dependencies id: apm_pack - uses: microsoft/apm-action@cc84c04bc73e19e35527f1efa34ea003be9f037f # v1.4.0 + uses: microsoft/apm-action@a190b0b1a91031057144dc136acf9757a59c9e4d # v1.4.1 env: GITHUB_TOKEN: ${{ secrets.GH_AW_PLUGINS_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} with: diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 0643debb84..388698bd50 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -433,6 +433,9 @@ var SerenaLanguageSupport = map[string][]string{ }, } +// DefaultAPMActionVersion is the default version of the microsoft/apm-action GitHub Action +const DefaultAPMActionVersion Version = "v1.4.1" + // DefaultAPMVersion is the default version of the microsoft/APM (Agent Package Manager) CLI const DefaultAPMVersion Version = "v0.8.5" diff --git a/pkg/workflow/apm_dependencies.go b/pkg/workflow/apm_dependencies.go index 604e492ba0..400ce19d82 100644 --- a/pkg/workflow/apm_dependencies.go +++ b/pkg/workflow/apm_dependencies.go @@ -4,6 +4,7 @@ import ( "fmt" "sort" + "github.com/github/gh-aw/pkg/constants" "github.com/github/gh-aw/pkg/logger" ) @@ -131,7 +132,11 @@ func GenerateAPMPackStep(apmDeps *APMDependenciesInfo, target string, data *Work apmDepsLog.Printf("Generating APM pack step: %d packages, target=%s", len(apmDeps.Packages), target) - actionRef := GetActionPin("microsoft/apm-action") + actionRef, err := GetActionPinWithData("microsoft/apm-action", string(constants.DefaultAPMActionVersion), data) + if err != nil { + apmDepsLog.Printf("Failed to resolve microsoft/apm-action@%s: %v", constants.DefaultAPMActionVersion, err) + actionRef = GetActionPin("microsoft/apm-action") + } lines := []string{ " - name: Install and pack APM dependencies", diff --git a/pkg/workflow/data/action_pins.json b/pkg/workflow/data/action_pins.json index d52621b08c..e242badd29 100644 --- a/pkg/workflow/data/action_pins.json +++ b/pkg/workflow/data/action_pins.json @@ -163,11 +163,6 @@ "version": "v2.10.3", "sha": "9cd1b7bf3f36d5a3c3b17abc3545bfb5481912ea" }, - "microsoft/apm-action@v1.4.0": { - "repo": "microsoft/apm-action", - "version": "v1.4.0", - "sha": "cc84c04bc73e19e35527f1efa34ea003be9f037f" - }, "oven-sh/setup-bun@v2.2.0": { "repo": "oven-sh/setup-bun", "version": "v2.2.0", @@ -182,6 +177,11 @@ "repo": "super-linter/super-linter", "version": "v8.5.0", "sha": "61abc07d755095a68f4987d1c2c3d1d64408f1f9" + }, + "microsoft/apm-action@v1.4.1": { + "repo": "microsoft/apm-action", + "version": "v1.4.1", + "sha": "a190b0b1a91031057144dc136acf9757a59c9e4d" } } }