-
-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (41 loc) · 1.15 KB
/
generate-pgo.yaml
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
name: "Generate PGO"
on:
push:
branches:
- master
paths:
- "pkg/tunnel/**.go"
- "go.*"
workflow_dispatch:
env:
PGO_FILE: "default.pgo"
PGO_BRANCH: "pgo"
jobs:
generate-pgo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: '**/go.sum'
- run: make pgo && cp ${{ env.PGO_FILE }} /tmp/
- uses: actions/checkout@v3
with:
ref: ${{ env.PGO_BRANCH }}
- run: git rm --cached ${{ env.PGO_FILE }}
- uses: actions/upload-artifact@v4
if: (success() || failure())
with:
name: pgo
path: ${{ env.PGO_FILE }}
retention-days: 90
overwrite: true
- name: pushing PGO file
run: |
cp /tmp/${{ env.PGO_FILE }} .
git config --local user.email "[email protected]"
git config --local user.name "ghost"
git add ${{ env.PGO_FILE }}
git commit -m "build(pgo): generate default PGO profile :robot:"
git push origin ${{ env.PGO_BRANCH }}