-
Notifications
You must be signed in to change notification settings - Fork 1.6k
44 lines (36 loc) · 1.32 KB
/
performance-comparison-label.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
name: Run Performance Comparison
on:
pull_request:
types: [ labeled ]
permissions:
pull-requests: write
issues: write
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
if: ${{ github.event.label.name == 'help:run-comparisonstats' }}
runs-on: ubuntu-latest
steps:
- name: Remove run-performance-comparison label
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: help:run-comparisonstats
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Parse comment template into gh output
id: parse-comment-template-into-gh-output
working-directory: ./hack/comparisonstats/comment-text
run: |
body=$(cat comment.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "body=$body" >> $GITHUB_OUTPUT
- name: Create comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{ github.event.pull_request.number }}
body: "${{ steps.parse-comment-template-into-gh-output.outputs.body }}"