Using passed version
@@ -13,6 +13,17 @@ on:
required: false
default: 'latest' # TODO
push: # Temporary for testing
+ inputs:
+ go_algorand_version:
+ description: "Go-Algorand Version"
+ type: string
+ required: false
+ default: 'latest' # TODO
+ indexer_version:
+ description: "Indexer Version"
+ type: string
+ required: false
+ default: 'latest' # TODO
jobs:
pr-generator:
runs-on: ubuntu-20.04
@@ -33,6 +44,17 @@ jobs:
repository: algorand/go-algorand
ref: rel/stable
path: go-algorand
+ - name: Get latest go-algorand version
+ run: |
+ if ${{ inputs.go_algorand_version == 'latest' }}; then
+ cd go-algorand
+ GO_ALGORAND_VERSION=`git tag --sort=committerdate --list 'v[0-9]*.[0-9]*.[0-9]*-stable' | tail -1 | sed 's/v//' | sed 's/-stable//'`
+ echo "::set-env name=GO_ALGORAND_VERSION::${GO_ALGORAND_VERSION}"
+ echo "GO_ALGORAND_VERSION set to ${GO_ALGORAND_VERSION}"
+ else
+ echo "::set-env name=GO_ALGORAND_VERSION::${{ inputs.go_algorand_version }}"
+ echo "GO_ALGORAND_VERSION set to ${{ inputs.go_algorand_version }}"
+ fi
- name: Clone Indexer repo
uses: actions/checkout@v3
with:
@@ -42,16 +64,16 @@ jobs:
- name: Download binaries
run: |
# TODO: use passed version or latest
- wget https://algorand-releases.s3.amazonaws.com/channel/stable/node_stable_linux-amd64_3.8.1.tar.gz
+ wget https://algorand-releases.s3.amazonaws.com/channel/stable/node_stable_linux-amd64_${GO_ALGORAND_VERSION}.tar.gz
wget https://algorand-releases.s3.amazonaws.com/indexer/2.13.0/algorand-indexer_linux_amd64_2.13.0.tar.bz2
ls -la
- name: Install binaries
run: |
# TODO: use passed version or latest
mkdir -p ~/go/bin
- mkdir -p node_stable_linux-amd64_3.8.1
- tar xzf node_stable_linux-amd64_3.8.1.tar.gz -C node_stable_linux-amd64_3.8.1/
- cd node_stable_linux-amd64_3.8.1/bin/
+ mkdir -p node_stable_linux-amd64_${GO_ALGORAND_VERSION}
+ tar xzf node_stable_linux-amd64_${GO_ALGORAND_VERSION}.tar.gz -C node_stable_linux-amd64_${GO_ALGORAND_VERSION}/
+ cd node_stable_linux-amd64_${GO_ALGORAND_VERSION}/bin/
cp goal algokey kmd diagcfg tealdbg ~/go/bin/
cd ../../
tar xjf algorand-indexer_linux_amd64_2.13.0.tar.bz2
@@ -60,10 +82,7 @@ jobs:
ls -la ~/go/bin
- name: Run doc generator
run: |
- pwd
- ls -la
cd docs/scripts/
- ls -la
./reformat-all-commands.sh ../../go-algorand/ ../../indexer/
git diff
- name: Create PR
