-
Notifications
You must be signed in to change notification settings - Fork 25
61 lines (57 loc) · 2.02 KB
/
gen_coverage_report.yml
File metadata and controls
61 lines (57 loc) · 2.02 KB
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
name: Generate Coverage Report
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
gen-coverage-report:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
with:
app-id: ${{ secrets.CQ_APP_ID }}
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up Go 1.x
id: setup-go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "1.26"
cache: false
- name: Cache Go modules
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}-
${{ runner.os }}-go-
- name: Generate Coverage Report
run: make coverage
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
with:
# required so the PR triggers workflow runs
token: ${{ steps.app-token.outputs.token }}
branch: chore/update_coverage_report
base: main
title: "chore: Update coverage report"
commit-message: "chore: Update coverage report"
body: This PR was created by a scheduled workflow to update the coverage report
labels: automerge