Skip to content

Commit 9acb75d

Browse files
authored
update jl-wandb to use inputs instead of env
1 parent d2b9b03 commit 9acb75d

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

.github/actions/exp/jl-wandb/action.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,54 @@ runs:
2222
steps:
2323
- name: prepare script
2424
env:
25-
CUR_BRANCH: $CUR_BRANCH
26-
CUR_PR_ID: $CUR_PR_ID
27-
GDRIVE_CREDENTIAL: $GDRIVE_CREDENTIAL
28-
GH_ACCESS_TOKEN: $GH_ACCESS_TOKEN
29-
CLOUD_ID: $JARVISLABS_ID
30-
CLOUD_AT: $JARVISLABS_ACCESS_TOKEN
31-
WANDB_PROJECT: $WANDB_PROJECT
32-
WANDB_API_KEY: $WANDB_API_KEY
25+
CUR_BRANCH: ${{ inputs.CUR_BRANCH }}
26+
CUR_PR_ID: ${{ inputs.CUR_PR_ID }}
27+
GDRIVE_CREDENTIAL: ${{ inputs.GDRIVE_CREDENTIAL }}
28+
GH_ACCESS_TOKEN: ${{ inputs.GH_ACCESS_TOKEN }}
29+
CLOUD_ID: ${{ inputs.JARVISLABS_ID }}
30+
CLOUD_AT: ${{ inputs.JARVISLABS_ACCESS_TOKEN }}
31+
WANDB_PROJECT: ${{ inputs.WANDB_PROJECT }}
32+
WANDB_API_KEY: ${{ inputs.WANDB_API_KEY }}
3333
run: |
3434
envsubst \
3535
'$CUR_BRANCH, \
3636
$CUR_PR_ID, \
3737
$GDRIVE_CREDENTIAL, \
3838
$GH_ACCESS_TOKEN, \
3939
$CLOUD_ID, \
40-
$CLOUD_AT' \
41-
< scripts/js_exp_wandb.sh \
42-
> scripts/js_exp_wandb_tmp.sh
40+
$CLOUD_AT, \
41+
$WANDB_PROJECT, \
42+
$WANDB_API_KEY' \
43+
< scripts/jl_exp_wandb.sh \
44+
> scripts/jl_exp_wandb_tmp.sh
45+
shell: bash
4346

4447
- name: install jarvislabs client
4548
run: |
4649
pip install typer
4750
pip install git+https://github.com/jarvislabsai/jlclient.git
51+
shell: bash
4852

4953
- name: add script to jarvislabs
5054
id: add_script
5155
run: |
5256
python clouds/jarvislabs.py \
5357
script add \
54-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} scripts/js_exp_wandb_tmp.sh \
58+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} scripts/jl_exp_wandb_tmp.sh \
5559
> outputs.txt
5660
echo "::set-output name=script_id::$(cat outputs.txt)"
61+
shell: bash
5762

5863
- name: create vm on jarvislabs
5964
run: |
6065
python clouds/jarvislabs.py \
6166
vm create \
62-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} ${{ steps.add_script.outputs.script_id }}
67+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} ${{ steps.add_script.outputs.script_id }}
68+
shell: bash
6369

6470
- name: remove script from jarvislabs
6571
run: |
6672
python clouds/jarvislabs.py \
6773
script remove \
68-
${{ env.CLOUD_AT }} ${{ env.CLOUD_ID }} ${{ steps.add_script.outputs.script_id }}
74+
${{ inputs.JARVISLABS_ACCESS_TOKEN }} ${{ inputs.JARVISLABS_ID }} ${{ steps.add_script.outputs.script_id }}
75+
shell: bash

0 commit comments

Comments
 (0)