Skip to content

Commit

Permalink
Upload PR number and base SHA as artifact
Browse files Browse the repository at this point in the history
For later use in configuring codecov
  • Loading branch information
johannaengland committed Jun 13, 2024
1 parent 4c84d24 commit d5217a4
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -46,3 +47,24 @@ jobs:
name: reports-${{ matrix.python-version }}
path: |
reports/**/*
upload-pr-number-base-sha:
name: Save PR number and base SHA in artifact
runs-on: ubuntu-latest
if: ${{ github.event.number && always() }}
env:
PR_NUMBER: ${{ github.event.number }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
steps:
- name: Make PR number file
run: |
mkdir -p ./extra
echo $PR_NUMBER > ./extra/pr_number
- name: Make base SHA file
run: |
echo $BASE_SHA > ./extra/base_sha
- name: Upload PR number file and base SHA file
uses: actions/upload-artifact@v4
with:
name: extra
path: extra/

0 comments on commit d5217a4

Please sign in to comment.