Skip to content

Commit

Permalink
fix: compile versions workflow (#269)
Browse files Browse the repository at this point in the history
<!--
Thank you for proposing a pull request! Please note that SOME TESTS WILL
LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from
forks.
Someone from the team will review your Pull Request and respond.

Please describe your change and any implementation details below.
-->
  • Loading branch information
verbanicm authored Jul 24, 2024
1 parent 2d43cee commit 82dfc67
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/compile-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ jobs:
with:
go-version-file: 'go.mod'

# This ensures the remote branch is check out or a new local branch is created.
# This allows us to diff against existing changes to prevet uneccessary PR updates.
- name: 'Setup git'
run: |-
git config user.name "google-github-actions-bot"
git config user.email "[email protected]"
# fetch the PR branch and switch to it, if it doesnt exist a new local branch is created
git fetch origin "${{ env.PR_BRANCH }}" && git switch -c "${{ env.PR_BRANCH }}"
- name: 'Get versions list'
run: |-
mkdir -p ./data
Expand All @@ -41,10 +51,6 @@ jobs:
echo "had_changes=true" >> ${GITHUB_OUTPUT}
git config user.name "google-github-actions-bot"
git config user.email "[email protected]"
git checkout -b "${{ env.PR_BRANCH }}"
git add ./data/versions.json
git commit -m "Update gcloud versions ($(date --iso-8601=h))"
git push -f origin "${{ env.PR_BRANCH }}"
Expand Down
3 changes: 1 addition & 2 deletions data/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,5 @@
"481.0.0",
"482.0.0",
"483.0.0",
"484.0.0",
"485.0.0"
"484.0.0"
]

0 comments on commit 82dfc67

Please sign in to comment.