-
Notifications
You must be signed in to change notification settings - Fork 696
49 lines (48 loc) · 1.39 KB
/
register-dataset.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
43
44
45
46
47
48
49
name: register-dataset
on:
workflow_call:
inputs:
data_file:
required: true
type: string
resource_group:
required: true
type: string
workspace_name:
required: true
type: string
file_type:
required: false
type: string
default: ""
name:
required: true
type: string
secrets:
creds:
required: true
jobs:
register-dataset:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: "Az CLI login"
uses: azure/login@v1
with:
creds: ${{secrets.creds}}
enable-AzPSSession: true
- name: install-extension
run: az extension add -n ml -y
- name: update-extension
run: az extension update -n ml
- name: create-dataset-from-file
if: ${{ inputs.file_type == ''}}
run: |
az ml data create --file ${{ github.workspace }}/${{ inputs.data_file }} --resource-group ${{ inputs.resource_group }} \
--workspace-name ${{ inputs.workspace_name }} --name ${{ inputs.name }}
- name: create-dataset-as-job
if: ${{ inputs.file_type != ''}}
run: |
az ml job create --file ${{ github.workspace }}/${{ inputs.data_file }} --resource-group ${{ inputs.resource_group }} \
--workspace-name ${{ inputs.workspace_name }}