11name : cd-badger
2- on : workflow_dispatch
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ releasetag :
6+ description : ' releasetag'
7+ required : true
8+ type : string
39jobs :
410 badger-build-amd64 :
511 runs-on : ubuntu-20.04
612 steps :
713 - uses : actions/checkout@v3
14+ with :
15+ ref : ' ${{ github.event.inputs.releasetag }}'
816 - name : Get Go Version
917 run : |
1018 #!/bin/bash
@@ -17,15 +25,15 @@ jobs:
1725 - name : Set Badger Release Version
1826 run : |
1927 #!/bin/bash
20- GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
21- if [[ "$GIT_BRANCH_NAME " == "release/ v"* ]];
28+ GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
29+ if [[ "$GIT_TAG_NAME " == "v"* ]];
2230 then
23- echo "this is a release branch "
31+ echo "this is a release tag "
2432 else
25- echo "this is NOT a release branch "
33+ echo "this is NOT a release tag "
2634 exit 1
2735 fi
28- BADGER_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | sed 's/release\///')
36+ BADGER_RELEASE_VERSION='${{ github.event.inputs.releasetag }}'
2937 echo "making a new release for "$BADGER_RELEASE_VERSION
3038 echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV
3139 - name : Fetch dependencies
4654 runs-on : [self-hosted, ARM64]
4755 steps :
4856 - uses : actions/checkout@v3
57+ with :
58+ ref : ' ${{ github.event.inputs.releasetag }}'
4959 - name : Get Go Version
5060 run : |
5161 #!/bin/bash
@@ -58,15 +68,15 @@ jobs:
5868 - name : Set Badger Release Version
5969 run : |
6070 #!/bin/bash
61- GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
62- if [[ "$GIT_BRANCH_NAME " == "release/ v"* ]];
71+ GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
72+ if [[ "$GIT_TAG_NAME " == "v"* ]];
6373 then
64- echo "this is a release branch "
74+ echo "this is a release tag "
6575 else
66- echo "this is NOT a release branch "
76+ echo "this is NOT a release tag "
6777 exit 1
6878 fi
69- BADGER_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | sed 's/release\///')
79+ BADGER_RELEASE_VERSION='${{ github.event.inputs.releasetag }}'
7080 echo "making a new release for "$BADGER_RELEASE_VERSION
7181 echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV
7282 - name : Fetch dependencies
0 commit comments