Generate PGO #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
cp /tmp/${{ 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: | | |
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 }} |