-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(actions): create diff action in github workflow
- Loading branch information
Showing
2 changed files
with
29 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
pull_request: | ||
# branches: [ "main" ] | ||
# Here the action will get the PR number | ||
- name: Get Pull Request Number | ||
id: pr | ||
run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")" | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
# Here the action will get the diff | ||
- name: Get Pull Request Diffing Files | ||
id: diff | ||
run: gh pr diff --name-only | ||
# run: gh pr diff PR_NUMBER | ||
|
||
# Can I get the diff in an environment variable? | ||
|
||
# jobs: | ||
# uses: actions/checkout@v4 | ||
# checkout code from repo | ||
# run cargo run ${{ github.actor }} | ||
# The name of your branch is ${{ github.ref }} | ||
|
||
jobs: | ||
success: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v4 |
This file contains 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