Skip to content

Commit

Permalink
Fix automation for updating builder lifecycle version
Browse files Browse the repository at this point in the history
Sets `GH_TOKEN` when calling `gh release view`, otherwise it returns
an empty payload (but still exits zero, sigh).

Also adjusts the PR creation step name to make it clearer that PRs
are also updated too.

GUS-W-14329446.
  • Loading branch information
edmorley committed Oct 19, 2023
1 parent 61c4604 commit 984eeb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/update-lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ jobs:
- name: Determine latest lifecycle version
id: latest-version
run: echo "version=$(gh release view --repo buildpacks/lifecycle --json tagName --jq '.tagName | sub("v"; "")')" >> "${GITHUB_OUTPUT}"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }}

- name: Update builder manifests with latest lifecycle version
# This only updates manifests that were on the same version as builder-22, to ensure
# that any legacy builder images pinned to older lifecycle versions are not updated too.
run: sed --in-place --expression 's/^version = "${{ steps.existing-version.outputs.version }}"$/version = "${{ steps.latest-version.outputs.version }}"/' */builder.toml

# This step will skip creating a PR if there are no changes to commit.
- name: Create pull request
# Note: This step will skip creating a PR if there are no changes to commit.
- name: Create or update pull request
id: pr
uses: peter-evans/[email protected]
with:
Expand Down

0 comments on commit 984eeb1

Please sign in to comment.