Skip to content

Commit

Permalink
update more files
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Mar 26, 2024
1 parent 56a8fdb commit 6094680
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/check-go-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,33 @@ jobs:
id: go-versions
run: cat ./.github/variables/go-versions.env > $GITHUB_OUTPUT

- name: Update go-versions.env
- name: Update go-versions.env and README.md
if: steps.go-versions.outputs.latest != env.officialLatestVersion
id: update
id: update-go-versions
run: |
sed < ./.github/variables/go-versions.env > updated-versions.tmp
-e "s#latest=[^ ]*#latest=${{ env.officialLatestVersion }}#g"
-e "s#penultimate=[^ ]*#penultimate=${{ env.officialPenultimateVersion }}#g"
mv updated-versions.tmp ./.github/variables/go-versions.env
sed -e "s#latest=[^ ]*#latest=${{ env.officialLatestVersion }}#g"
-e "s#penultimate=[^ ]*#penultimate=${{ env.officialPenultimateVersion }}#g"
./.github/variables/go-versions.env
sed -i "s/Go version {{ steps.go-versions.outputs.penultimate }}/Go version ${{ env.officialPenultimateVersion }}/g" README.md
- name: Update go.mod and testservice/go.mod
if: steps.update-go-versions.outcome == 'success'
id: update-go-mod
run: |
go mod edit -go=${{ env.officialPenultimateVersion }}
cd testservice
go mod edit -go=${{ env.officialPenultimateVersion }}
- name: Create pull request
if: steps.update.outcome == 'success'
if: steps.update-go-mod.outcome == 'success'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: .github/variables/go-versions.env
add-paths: |
.github/variables/go-versions.env
README.md
go.mod
testservice/go.mod
branch: "launchdarklyreleasebot/update-to-go${{ env.officialLatestVersion }}-${{ matrix.branch }}"
author: "LaunchDarklyReleaseBot <[email protected]>"
committer: "LaunchDarklyReleaseBot <[email protected]>"
Expand Down

0 comments on commit 6094680

Please sign in to comment.