Implement automated release workflow with scheduled GitHub Actions and issue templates #3681
This file contains hidden or 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: Trigger benchmarks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [synchronize] | |
| permissions: | |
| contents: read | |
| jobs: | |
| trigger-benchmark: | |
| name: Trigger Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Trigger benchmarks (PR) | |
| id: setup_pr | |
| if: contains(github.event.pull_request.labels.*.name, 'benchmark PR') | |
| env: | |
| AUTHOR: ${{ github.event.pull_request.assignee.login }} | |
| BRANCH: ${{ github.head_ref }} | |
| PIPE_TRIGGER_TOKEN: ${{ secrets.BENCH_PIPE_TRIGGER }} | |
| SHA: ${{ github.event.pull_request.head.sha }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| SHORT_SHA=$(git rev-parse --short $SHA) | |
| curl -s -X POST \ | |
| --fail-with-body \ | |
| -F "token=$PIPE_TRIGGER_TOKEN" \ | |
| -F "ref=main" \ | |
| -F "variables[SHA]=$SHA" \ | |
| -F "variables[SHORT_SHA]=${SHORT_SHA}" \ | |
| -F "variables[BRANCH]=$BRANCH" \ | |
| -F "variables[PR]=$PR_NUMBER" \ | |
| -F "variables[AUTHOR]=${AUTHOR:-heat_team}" \ | |
| https://codebase.helmholtz.cloud/api/v4/projects/7930/trigger/pipeline | |
| - name: Trigger benchmarks (Push main) | |
| id: setup_push | |
| if: ${{ github.event_name == 'push' }} | |
| env: | |
| AUTHOR: ${{ github.event.pull_request.assignee.login }} | |
| PIPE_TRIGGER_TOKEN: ${{ secrets.BENCH_PIPE_TRIGGER }} | |
| SHA: ${{ github.sha }} | |
| run: | | |
| SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) | |
| curl -s -X POST \ | |
| --fail-with-body \ | |
| -F "token=$PIPE_TRIGGER_TOKEN" \ | |
| -F "ref=main" \ | |
| -F "variables[SHA]=$SHA" \ | |
| -F "variables[SHORT_SHA]=${SHORT_SHA}" \ | |
| -F "variables[BRANCH]=main" \ | |
| -F "variables[AUTHOR]=${AUTHOR:-heat_team}" \ | |
| https://codebase.helmholtz.cloud/api/v4/projects/7930/trigger/pipeline |