Skip to content

Commit

Permalink
ci: move branch handling to benchmark workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guitarrapc committed Jul 23, 2024
1 parent a6680cb commit 74fbe75
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,10 @@ permissions:
pull-requests: write

jobs:
prepare:
outputs:
branch: ${{ steps.get-branch.outputs.name }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Get branch name
id: get-branch
run: |
if [[ "${{ github.event_name }}" == "issue_comment" && "${{ github.event.issue.pull_request.html_url }}" != "" ]]; then
# issue_comment (pull_request)
branch=$(gh pr view "${{ github.event.issue.pull_request.html_url }}" --json headRefName | jq -r ".headRefName")
echo "name=${branch}" | tee -a "$GITHUB_OUTPUT"
else
# workflow_dispatch or issue_comment (issue)
echo "name=${{ github.ref_name }}" | tee -a "$GITHUB_OUTPUT"
fi
# run benchmark
benchmark:
needs: [prepare]
uses: Cysharp/Actions/.github/workflows/benchmark.yaml@main
with:
branch: ${{ needs.prepare.outputs.branch }}
dotnet-version: "8.0"
environment: benchmark
benchmark-name: "magiconion-${{ github.event.issue.number || github.run_number }}"
Expand Down

0 comments on commit 74fbe75

Please sign in to comment.