Skip to content

Commit ae77982

Browse files
authored
update env to inputs
1 parent e501fd2 commit ae77982

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

Diff for: .github/actions/exp/jl-dvc/action.yml

+10-15
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ runs:
1717
using: "composite"
1818
steps:
1919
- name: prepare script
20-
if: steps.check.outputs.triggered == 'true'
2120
env:
22-
CUR_BRANCH: ${{ steps.pr_data.outputs.branch }}
23-
CUR_PR_ID: ${{ steps.pr_data.outputs.number }}
24-
GDRIVE_CREDENTIAL: ${{ secrets.GDRIVE_CREDENTIAL }}
25-
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
26-
CLOUD_ID: ${{ env.JARVISLABS_ID }}
27-
CLOUD_AT: ${{ env.JARVISLABS_ACCESS_TOKEN }}
21+
CUR_BRANCH: ${{ inputs.CUR_BRANCH }}
22+
CUR_PR_ID: ${{ inputs.CUR_PR_ID }}
23+
GDRIVE_CREDENTIAL: ${{ inputs.GDRIVE_CREDENTIAL }}
24+
GH_ACCESS_TOKEN: ${{ inputs.GH_ACCESS_TOKEN }}
25+
CLOUD_ID: ${{ inputs.JARVISLABS_ID }}
26+
CLOUD_AT: ${{ inputs.JARVISLABS_ACCESS_TOKEN }}
2827
run: |
2928
envsubst \
3029
'$CUR_BRANCH, \
@@ -36,32 +35,28 @@ runs:
3635
< scripts/experiments.sh \
3736
> scripts/experiments_tmp.sh
3837
39-
- name: install jarvislabs client
40-
if: steps.check.outputs.triggered == 'true'
38+
- name: install jarvislabs client
4139
run: |
4240
pip install typer
4341
pip install git+https://github.com/jarvislabsai/jlclient.git
4442
4543
- name: add script to jarvislabs
4644
id: add_script
47-
if: steps.check.outputs.triggered == 'true'
4845
run: |
4946
python clouds/jarvislabs.py \
5047
script add \
51-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} scripts/experiments_tmp.sh \
48+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} scripts/experiments_tmp.sh \
5249
> outputs.txt
5350
echo "::set-output name=script_id::$(cat outputs.txt)"
5451
5552
- name: create vm on jarvislabs
56-
if: steps.check.outputs.triggered == 'true'
5753
run: |
5854
python clouds/jarvislabs.py \
5955
vm create \
60-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} ${{ steps.add_script.outputs.script_id }}
56+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} ${{ steps.add_script.outputs.script_id }}
6157
6258
- name: remove script from jarvislabs
63-
if: steps.check.outputs.triggered == 'true'
6459
run: |
6560
python clouds/jarvislabs.py \
6661
script remove \
67-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} ${{ steps.add_script.outputs.script_id }}
62+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} ${{ steps.add_script.outputs.script_id }}

0 commit comments

Comments
 (0)