@@ -25,6 +25,12 @@ outputs:
25
25
runs :
26
26
using : ' composite'
27
27
steps :
28
+ - name : Generate unique work id
29
+ id : gen-guid
30
+ shell : pwsh
31
+ run : |
32
+ $guid = [guid]::NewGuid().ToString()
33
+ echo "workid=$guid" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
28
34
29
35
- name : Fetch issue data
30
36
id : issue-data
42
48
const json = JSON.stringify(data, null, 2);
43
49
44
50
const fs = require('fs');
45
- io.mkdirP('${{ runner.temp }}/apply-label');
46
- fs.writeFileSync('${{ runner.temp }}/apply-label/issue.json', json);
51
+ io.mkdirP('${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} ');
52
+ fs.writeFileSync('${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /issue.json', json);
47
53
48
54
return data;
49
55
@@ -53,12 +59,10 @@ runs:
53
59
GH_TOKEN : ${{ inputs.token }}
54
60
run : |
55
61
"Setup working directory"
56
- echo "::group::Setup working directory"
57
- cd ${{ runner.temp }}/apply-label
62
+ cd ${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }}
58
63
git init
59
64
git remote add origin ${{ github.repositoryUrl }}
60
65
gh repo set-default ${{ github.repository }}
61
- echo "::endgroup::"
62
66
63
67
- name : Create User prompt file
64
68
id : create-user-prompt
@@ -67,12 +71,10 @@ runs:
67
71
GH_TOKEN : ${{ inputs.token }}
68
72
run : |
69
73
"Create User prompt file"
70
- echo "::group::Create User prompt file"
71
74
${{ github.action_path }}/process-prompt-template.ps1 `
72
75
-LabelPrefix "${{ inputs.label-prefix }}" `
73
76
-Template "${{ github.action_path }}/user-prompt-template.md" `
74
- -Output "${{ runner.temp }}/apply-label/user-prompt.md"
75
- echo "::endgroup::"
77
+ -Output "${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }}/user-prompt.md"
76
78
77
79
- name : Create System prompt file
78
80
id : create-system-prompt
@@ -85,26 +87,26 @@ runs:
85
87
${{ github.action_path }}/process-prompt-template.ps1 `
86
88
-LabelPrefix "${{ inputs.label-prefix }}" `
87
89
-Template "${{ github.action_path }}/system-prompt-template.md" `
88
- -Output "${{ runner.temp }}/apply-label/system-prompt.md"
90
+ -Output "${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /system-prompt.md"
89
91
echo "::endgroup::"
90
92
91
93
- name : Print prompt files
92
94
shell : pwsh
93
95
run : |
94
96
"Print prompt files"
95
97
echo "::group::System Prompt"
96
- cat ${{ runner.temp }}/apply-label/system-prompt.md
98
+ cat ${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /system-prompt.md
97
99
echo "::endgroup::"
98
100
echo "::group::User Prompt"
99
- cat ${{ runner.temp }}/apply-label/user-prompt.md
101
+ cat ${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /user-prompt.md
100
102
echo "::endgroup::"
101
103
102
104
- name : Run AI inference
103
105
id : inference
104
106
uses : actions/ai-inference@main
105
107
with :
106
- prompt-file : " ${{ runner.temp }}/apply-label/user-prompt.md"
107
- system-prompt-file : " ${{ runner.temp }}/apply-label/system-prompt.md"
108
+ prompt-file : " ${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /user-prompt.md"
109
+ system-prompt-file : " ${{ runner.temp }}/apply-label-${{ steps.gen-guid.outputs.workid }} /system-prompt.md"
108
110
env :
109
111
GITHUB_TOKEN : ${{ inputs.token }}
110
112
0 commit comments