Skip to content

Commit

Permalink
Update codecov.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
icfaust authored Dec 12, 2024
1 parent 7f66fe7 commit d1ff516
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ on:
- completed
workflow_dispatch:
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
upload_coverage:
Expand All @@ -46,7 +43,8 @@ jobs:
chmod +x codecov
- name: Upload to codecov
run: |
# github does not reliably return the PR number for workflow_run. This workaround will get the PR (if a PR)
# github's webhooks for workflow_run are unreliable, this guarantees to pull the PR number if a PR
OWNER = "${FULL_NAME%/$NAME}"
if [ "${{ github.repository_owner }}" != "${OWNER}" ]; then BRANCH="${OWNER}:${BRANCH}"; fi
if [ $(git branch --show-current) != $BRANCH ]; then PR=$(gh pr view $BRANCH --json number -q .number); fi
echo uploading $BRANCH
Expand All @@ -58,4 +56,5 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
BRANCH: ${{ github.event.workflow_run.head_branch }}
OWNER: ${{ github.event.workflow_run.head_repository.owner.name }}
NAME: $${{ github.event.workflow_run.head_repository.name }}
FULL_NAME: ${{ github.event.workflow_run.head_repository.full_name }}

0 comments on commit d1ff516

Please sign in to comment.