-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.34 KB
/
create-annotations.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
name: Create and read annotations
on:
# Enables manual start of workflow
push:
workflow_dispatch:
jobs:
#create_annotations_in_matrix:
# name: Create annotations
# runs-on: ubuntu-latest
# strategy:
# matrix:
# level: ["warning", "error"]
# message: ["foo", "bar"]
# steps:
compile-awful-code:
name: Compile awful code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add problem matcher
uses: olemorud/[email protected]
- name: Compile bad code
run: c++ -Wall -Wextra test/bad-code.cpp
- name: Create annotation that should not be matched
run: echo "::error::foo"
read_annotations:
name: Read annotations
needs: [compile-awful-code]
runs-on: ubuntu-latest
permissions:
checks: write
actions: read
steps:
- uses: actions/checkout@v3
- name: npm install
run: npm ci
- name: Print the annotations of this run
uses: ./
with:
workflow_id: ${{ github.run_id }}
filter: '\[-W[a-zA-Z-]+?\]'
GH_TOKEN: ${{ github.token }}
event_file:
name: "Upload Event Payload"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}