-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(devops): automatically upgrade gosdk (#212)
- Loading branch information
Showing
3 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: "Upgrade 0Chain GoSDK" | ||
|
||
concurrency: | ||
group: "gosdk-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
gosdk: | ||
description: 'The version of 0Chain GoSDK' | ||
required: true | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: [self-hosted, build] | ||
steps: | ||
- name: Setup go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.17' | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Upgrade 0Chain GoSDK | ||
run: | | ||
echo "BRANCH=$(echo ${{github.event.inputs.gosdk}} | sed 's/\//-/g')" >> $GITHUB_ENV | ||
go get github.com/0chain/gosdk@${{github.event.inputs.gosdk}} | ||
go mod tidy | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
base: staging | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: upgrade GoSDK to ${{ github.event.inputs.gosdk }} | ||
branch: gosdk-upgrade-${{ env.BRANCH }} | ||
delete-branch: true | ||
title: Upgrade 0Chain GoSDK to ${{ github.event.inputs.gosdk }} | ||
body: | | ||
0Chain GoSDK `${{ github.event.inputs.gosdk }}` is released. | ||
see full changelog on https://github.com/0chain/gosdk/releases/tag/${{ github.event.inputs.gosdk }} | ||
draft: false | ||
reviewers: cnlangzi | ||
labels: GoSDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters