Skip to content

Commit

Permalink
Merge pull request #103 from 0chain/boddumanohar-patch-1
Browse files Browse the repository at this point in the history
Update gosdk.yml: update create-pr workflow
  • Loading branch information
dabasov authored Dec 6, 2023
2 parents d0b1751 + 8b4b6f4 commit 34d51f8
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/gosdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,37 @@ on:
workflow_dispatch:
inputs:
gosdk:
description: 'The version of 0Chain GoSDK'
description: 'The version/branch of 0Chain GoSDK'
required: true
base:
description: the base branch to which PR needs to be raised
required: true

jobs:
create-pr:
runs-on: [self-hosted, build]
runs-on: [arc-runner]
steps:
- name: Setup go 1.18
- name: Setup go 1.20
uses: actions/setup-go@v2
with:
go-version: '1.18'
go-version: '1.20'

- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.base }}

- 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
base: ${{ github.event.inputs.base }}
token: ${{ secrets.GOSDK }}
commit-message: upgrade GoSDK to ${{ github.event.inputs.gosdk }}
branch: gosdk-upgrade-${{ env.BRANCH }}
Expand All @@ -43,5 +48,5 @@ jobs:
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
reviewers: guruhubb
labels: GoSDK

0 comments on commit 34d51f8

Please sign in to comment.