Skip to content

Commit 4008772

Browse files
authored
Update gosdk.yml: use base branch for pr checkout (#84)
1 parent 37fbc75 commit 4008772

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/gosdk.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,37 @@ on:
88
workflow_dispatch:
99
inputs:
1010
gosdk:
11-
description: 'The version of 0Chain GoSDK'
11+
description: 'The version/branch of 0Chain GoSDK'
12+
required: true
13+
base:
14+
description: the base branch to which PR needs to be raised
1215
required: true
1316

1417
jobs:
1518
create-pr:
16-
runs-on: [self-hosted, build]
19+
runs-on: [arc-runner]
1720
steps:
18-
- name: Setup go 1.18
21+
- name: Setup go 1.20
1922
uses: actions/setup-go@v2
2023
with:
21-
go-version: '1.18'
24+
go-version: '1.20'
2225

2326
- name: Checkout
24-
uses: actions/checkout@v1
27+
uses: actions/checkout@v4
28+
with:
29+
ref: ${{ github.event.inputs.base }}
2530

2631
- name: Upgrade 0Chain GoSDK
2732
run: |
2833
echo "BRANCH=$(echo ${{github.event.inputs.gosdk}} | sed 's/\//-/g')" >> $GITHUB_ENV
29-
34+
3035
go get github.com/0chain/gosdk@${{github.event.inputs.gosdk}}
3136
go mod tidy
3237
3338
- name: Create Pull Request
3439
uses: peter-evans/create-pull-request@v3
3540
with:
36-
base: staging
41+
base: ${{ github.event.inputs.base }}
3742
token: ${{ secrets.GOSDK }}
3843
commit-message: upgrade GoSDK to ${{ github.event.inputs.gosdk }}
3944
branch: gosdk-upgrade-${{ env.BRANCH }}
@@ -43,5 +48,5 @@ jobs:
4348
0Chain GoSDK `${{ github.event.inputs.gosdk }}` is released.
4449
see full changelog on https://github.com/0chain/gosdk/releases/tag/${{ github.event.inputs.gosdk }}
4550
draft: false
46-
reviewers: cnlangzi
51+
reviewers: guruhubb
4752
labels: GoSDK

0 commit comments

Comments
 (0)