Skip to content

Commit

Permalink
Test benchmarks workflow add permissions for pull requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Aug 22, 2024
1 parent 2ac9c68 commit a6abd96
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ env:
WORKING_DIRECTORY: testing/benchmark

permissions:
contents: read
contents: write
pull-requests: write

jobs:
benchmarks:
Expand All @@ -39,8 +40,9 @@ jobs:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
permissions:
contents: read
contents: write
id-token: write
pull-requests: write
env:
SSH_KEY: ./id_rsa_terraform
TF_VAR_private_key: ./id_rsa_terraform
Expand Down Expand Up @@ -185,14 +187,17 @@ jobs:
cd ${{ github.workspace }}
git config user.email "[email protected]"
git config user.name "APM Server"
git checkout origin main
BRANCH="update-pgo-$(date +%s)"
git checkout -b "$BRANCH"
echo "test" > default.pgo
git add default.pgo
git commit -m "PGO: Update default.pgo from benchmarks $WORKFLOW."
git push -u origin "$BRANCH"
gh auth status
gh pr create -B main -H "$BRANCH" -f -R elastic/apm-server
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}

# - name: Tear down benchmark environment
# if: always()
Expand Down

0 comments on commit a6abd96

Please sign in to comment.