Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added custom taqueria versions #34

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/action-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ jobs:
with:
plugins: '@taqueria/plugin-ligo, @taqueria/plugin-flextesa, @taqueria/plugin-taquito, @taqueria/plugin-jest'
compile_contracts: counter.jsligo
sandbox_name: local
deploy_contracts: counter.tz
sandbox_name: local
taqueria_version: 'v0.16.0'

- name: upload artifacts
uses: actions/upload-artifact@v3
Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ inputs:
sandbox_name:
description: 'The name of the sandbox if any'
required: false
taqueria_version:
description: 'An input for specifying a different version of the taqueria binary. The version should be in the format of a PR number e.g 1105 or a release version like v0.1.0. Please note that using this option will increase action runtime slightly.'
required: false
task:
description: 'The task for taqueria to run'
required: false
Expand All @@ -34,10 +37,13 @@ runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.compile_command }}
- ${{ inputs.contracts }}
- ${{ inputs.environment }}
- ${{ inputs.deploy_contracts }}
- ${{ inputs.plugins }}
- ${{ inputs.project_directory }}
- ${{ inputs.sandbox_name }}
- ${{ inputs.deploy_contracts }}
- ${{ inputs.taqueria_version }}
- ${{ inputs.task }}
- ${{ inputs.tests }}
15 changes: 15 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ else
cd $INPUT_PROJECT_DIRECTORY || exit 1
fi

if [ -n "$INPUT_TAQUERIA_VERSION" ]; then
echo "Removing existing binary"
rm /bin/taq
echo "Downloading binary from $INPUT_TAQUERIA_VERSION"
if [[ $INPUT_TAQUERIA_VERSION =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)?$ ]]; then
curl -Lo /bin/taq "https://github.com/ecadlabs/taqueria/releases/download/$INPUT_TAQUERIA_VERSION/taq-linux"
elif [[ $INPUT_TAQUERIA_VERSION =~ ^[0-9]{0,10}$ ]]; then
curl -Lo /bin/taq "https://storage.googleapis.com/taqueria-artifacts/refs/pull/$INPUT_TAQUERIA_VERSION/merge/taq.x86_64-unknown-linux-gnu"
else
echo "$INPUT_TAQUERIA_VERSION is not a valid version number"
exit 1
fi
chmod +x /bin/taq
taq --version || exit 1
fi

if [ "$INPUT_TASK" == "init" ]; then
echo "Initializing project..."
Expand Down