Skip to content

Commit

Permalink
Attach an artifact containing the pr number to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Apr 4, 2021
1 parent b29602c commit 2738d83
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ env:
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
jobs:
# This is a hack to work around a GitHub API limitation:
# when the PR is coming from another fork, the pull_requests field of the
# workflow_run payload is empty.
# For more details, see
# https://github.community/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682
attach-pr-number:
runs-on: ubuntu-latest
name: Attach pull request number
if: github.event_name == 'pull_request'
steps:
- name: Create file
shell: bash
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v2
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
ci-sanity-check:
name: "CI Sanity Check"
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2738d83

Please sign in to comment.