Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <[email protected]>
  • Loading branch information
NikitaSkrynnik committed Aug 4, 2023
1 parent 0e0ce94 commit 3e45ec6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-go-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- 'update/go_*'
- 'main'
jobs:
update-go-version:
runs-on: ubuntu-latest
Expand All @@ -21,10 +22,10 @@ jobs:
id: get-go-version
run: |
OLD_GO_VERSION=$(grep -F "go-version: " .github/workflows/build-and-test.yaml)
OLD_GO_VERSION=${OLD_GO_VERSION//"go-version: "/""}
OLD_GO_VERSION=$(echo $OLD_GO_VERSION | sed -e 's/go-version: //g')
OLD_GO_MAJOR_VERSION=${OLD_GO_VERSION%.*}
NEW_GO_VERSION=${${{ github.ref }}//"refs/heads/update/go_"/""}
NEW_GO_VERSION=$(echo "${{ github.ref }}" | sed 's/refs\/heads\/update\/go_//g')
NEW_GO_MAJOR_VERSION=${NEW_GO_VERSION%.*}
echo "Old go version $OLD_GO_VERSION"
Expand Down
10 changes: 10 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

string="refs/heads/update/go_1.30.8"
f=${string#refs/heads/update/go_}

echo $f

OLD_GO_VERSION=$(grep -F "go-version: " .github/workflows/build-and-test.yaml)
OLD_GO_VERSION=$(echo $OLD_GO_VERSION | sed -e 's/go-version: //g')

echo $OLD_GO_VERSION

0 comments on commit 3e45ec6

Please sign in to comment.