-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
42 lines (42 loc) · 1.54 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# action.yml
name: 'Provenance Action'
description: 'Action to test Provenance and Smart Contracts'
inputs:
github_token:
description: 'Github token from the workflow'
required: true
provenance_version:
description: 'Version of Provenance to perform test. Either a release or a branch'
required: true
smart_contract_action_version:
description: 'Version of Smart Contract Action to perform test'
required: false
default: latest
init_data:
description: 'Initial data directory to be used for starting Provenance'
required: false
test_script:
description: 'Script used to run tests after provenance has been setup and is running'
required: false
runs:
using: composite
steps:
- name: download provenance release
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ inputs.GITHUB_TOKEN }}
branch: ${{ inputs.provenance_version }}
repo: provenance-io/provenance
workflow: release.yml
workflow_conclusion: ""
name: linux-zip
- name: run smart contract action
id: smart-contract-action
shell: bash
env:
IMAGE: "provenanceio/smart-contract-action:${{ inputs.smart_contract_action_version }}"
INIT_DATA: "${{ inputs.init_data != null && inputs.init_data || false }}"
TEST_SCRIPT: "${{ inputs.test_script != null && inputs.test_script || false }}"
run: |
docker pull ${{ env.IMAGE }}
docker run -v $GITHUB_WORKSPACE:/scratch:Z ${{ env.IMAGE }} ${{ env.INIT_DATA }} ${{ env.TEST_SCRIPT }}