-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
101 lines (83 loc) · 3.17 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: "Setup branch and parser for Issue Request"
inputs:
issueNumber:
required: true
type: number
token:
required: true
type: string
outputs:
MODELPATH:
description: "The path to the file to update"
value: ${{ steps.get_path.outputs.path }}
DOCKER:
description: "The docker url to update"
value: ${{ steps.get_docker_url.outputs.docker_url }}
PYTHONS:
value: ${{ steps.issue-parser.outputs.issueparser_python-scripts }}
BRANCHNAME:
value: ${{ steps.Create_Issue_Branch.outputs.branchName }}
UPDATES:
value: ${{ steps.get_updates.outputs.updates }}
WEIGHTS:
value: ${{ steps.get_weights.outputs.weights }}
MODELINFO:
value: ${{ steps.issue-parser.outputs.issueparser_model_info }}
SAMPLEDATA:
value: ${{ steps.get_data.outputs.sample_data }}
CONFIG:
value: ${{ steps.get_model_config.outputs.model_config }}
TESTCOMMAND:
value: ${{ steps.get_test_command.outputs.test_command }}
runs:
using: "composite"
steps:
# This will automatically create a new branch from this issue, using custom config at /.github/issue-branch.yml 🟢 ♻️
- name: Create Issue Branch
id: Create_Issue_Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN:
${{ inputs.token }}
# Checkout the repository to the GitHub Actions runner
# This is when the action fails and the user wants to update the issue scripts
# This will ref the issue branch and allow for the rest of the script to update
# the branch. 🟢 ♻️
# If branchName is empty use issue number, else, use the branchName 🟢 ♻️
- uses: actions/checkout@v3
with:
ref: ${{ steps.Create_Issue_Branch.outputs.branchName }}
# Parse the issue template and content 🟢 ♻️
- uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/updateModel.yml # optional but recommended
# Get what is being updated checkboxes
- name: Get updates
shell: bash
id: get_updates
run: echo "updates=${{ steps.issue-parser.outputs.issueparser_updates }}" >> $GITHUB_OUTPUT
- name: Get the Path
shell: bash
id: get_path
run: echo "path=${{ steps.issue-parser.outputs.issueparser_pathNew }}" >> $GITHUB_OUTPUT
- name: Get the Weights
shell: bash
id: get_weights
run: echo "weights=${{ steps.issue-parser.outputs.issueparser_weights }}" >> $GITHUB_OUTPUT
- name: Get Sample Data
shell: bash
id: get_data
run: echo "sample_data=${{ steps.issue-parser.outputs.issueparser_sample-data }}" >> $GITHUB_OUTPUT
- name: Get Test Command
shell: bash
id: get_test_command
run: echo "test_command=${{ steps.issue-parser.outputs.issueparser_testCommand }}" >> $GITHUB_OUTPUT
- name: Get Config
id: get_model_config
shell: bash
run: echo "model_config=${{ steps.issue-parser.outputs.issueparser_modelConfig }}" >> $GITHUB_OUTPUT
- name: Get Docker URL
shell: bash
id: get_docker
run: echo "docker_url=${{ steps.issue-parser.outputs.issueparser_docker }}" >> $GITHUB_OUTPUT