Skip to content

Commit 2b26966

Browse files
committed
sadf
1 parent 3190061 commit 2b26966

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/actions/triage-labels/action.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ outputs:
2525
runs:
2626
using: 'composite'
2727
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
2834
2935
- name: Fetch issue data
3036
id: issue-data
@@ -42,8 +48,8 @@ runs:
4248
const json = JSON.stringify(data, null, 2);
4349
4450
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);
4753
4854
return data;
4955
@@ -53,12 +59,10 @@ runs:
5359
GH_TOKEN: ${{ inputs.token }}
5460
run: |
5561
"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 }}
5863
git init
5964
git remote add origin ${{ github.repositoryUrl }}
6065
gh repo set-default ${{ github.repository }}
61-
echo "::endgroup::"
6266
6367
- name: Create User prompt file
6468
id: create-user-prompt
@@ -67,12 +71,10 @@ runs:
6771
GH_TOKEN: ${{ inputs.token }}
6872
run: |
6973
"Create User prompt file"
70-
echo "::group::Create User prompt file"
7174
${{ github.action_path }}/process-prompt-template.ps1 `
7275
-LabelPrefix "${{ inputs.label-prefix }}" `
7376
-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"
7678
7779
- name: Create System prompt file
7880
id: create-system-prompt
@@ -85,26 +87,26 @@ runs:
8587
${{ github.action_path }}/process-prompt-template.ps1 `
8688
-LabelPrefix "${{ inputs.label-prefix }}" `
8789
-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"
8991
echo "::endgroup::"
9092
9193
- name: Print prompt files
9294
shell: pwsh
9395
run: |
9496
"Print prompt files"
9597
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
9799
echo "::endgroup::"
98100
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
100102
echo "::endgroup::"
101103
102104
- name: Run AI inference
103105
id: inference
104106
uses: actions/ai-inference@main
105107
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"
108110
env:
109111
GITHUB_TOKEN: ${{ inputs.token }}
110112

0 commit comments

Comments
 (0)