Skip to content

Commit

Permalink
Merge pull request #216 from arnested/arnested-patch-1
Browse files Browse the repository at this point in the history
Update go-version.yml
  • Loading branch information
arnested authored Mar 6, 2024
2 parents 10e27e8 + ceab5c1 commit 097c081
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/go-version.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: Go version update
on:
workflow_dispatch:
schedule:
- cron: '23 15 * * *'
- cron: '45 * * * *'

permissions:
contents: read
contents: write
pull-requests: write

jobs:
stable:
Expand Down Expand Up @@ -44,36 +46,43 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: arnested/go-version-action@v1
id: go-version
id: go-version-stable
with:
patch-level: true
- uses: arnested/go-version-action@v1
id: go-version-unstable
with:
patch-level: true
unstable: true
- name: Get draft release notes URL
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
id: release-notes
run: |
# shellcheck disable=SC2086
echo "URL=https://tip.golang.org/doc/go$(sed -E 's/([0-9]+\.[0-9]+).*/\1/' <<< '${{ steps.go-version.outputs.latest }}')" >> $GITHUB_OUTPUT
- name: Setup Go ${{ steps.go-version.outputs.latest }}
echo "URL=https://tip.golang.org/doc/go$(sed -E 's/([0-9]+\.[0-9]+).*/\1/' <<< '${{ steps.go-version-unstable.outputs.latest }}')" >> $GITHUB_OUTPUT
- name: Setup Go ${{ steps.go-version-unstable.outputs.latest }}
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version: ${{ steps.go-version.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version.outputs.latest }}
go-version: ${{ steps.go-version-unstable.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version-unstable.outputs.latest }}
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
- run: git diff
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
- name: "Create pull request"
uses: peter-evans/create-pull-request@v6
with:
draft: true
commit-message: |
Test Go unstable version ${{ steps.go-version.outputs.latest }}
Test Go unstable version ${{ steps.go-version-unstable.outputs.latest }}
See the draft release notes: ${{ steps.release-notes.outputs.URL }}.
branch: go-version-unstable-test
delete-branch: true
title: Test Go unstable version ${{ steps.go-version.outputs.latest }}
title: Test Go unstable version ${{ steps.go-version-unstable.outputs.latest }}
body: |
Test Go unstable version ${{ steps.go-version.outputs.latest }}.
Test Go unstable version ${{ steps.go-version-unstable.outputs.latest }}.
See [the draft release notes](${{ steps.release-notes.outputs.URL }}).
This pull request is only intented for getting feedback on compatibility with future Go versions. Don't merge it!
token: ${{ secrets.PAT_TOKEN }}

0 comments on commit 097c081

Please sign in to comment.