update pr workflow
This commit is contained in:
@@ -21,7 +21,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
webpack-analyzer:
|
webpack-analyzer:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'}}
|
||||||
steps:
|
steps:
|
||||||
- name: ⬇️ Checkout
|
- name: ⬇️ Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -96,8 +96,7 @@ jobs:
|
|||||||
|
|
||||||
test-suite-fingerprint:
|
test-suite-fingerprint:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'}}
|
||||||
concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⬇️ Checkout
|
- name: ⬇️ Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -117,32 +116,23 @@ jobs:
|
|||||||
- name: ⚙️ Install Dependencies
|
- name: ⚙️ Install Dependencies
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: Get the base commit
|
|
||||||
id: base-commit
|
|
||||||
run: echo base-commit=$(git log -n 1 main --pretty=format:'%H') >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: 📷 Check fingerprint
|
- name: 📷 Check fingerprint
|
||||||
id: fingerprint
|
id: fingerprint
|
||||||
uses: expo/expo-github-action/fingerprint@main
|
uses: bluesky-social/github-actions/fingerprint-native@main
|
||||||
with:
|
with:
|
||||||
previous-git-commit: ${{ steps.base-commit.outputs.base-commit }}
|
profile: pull-request
|
||||||
|
|
||||||
- name: 👀 Debug fingerprint
|
|
||||||
run: |
|
|
||||||
echo "previousGitCommit=${{ steps.fingerprint.outputs.previous-git-commit }} currentGitCommit=${{ steps.fingerprint.outputs.current-git-commit }}"
|
|
||||||
echo "isPreviousFingerprintEmpty=${{ steps.fingerprint.outputs.previous-fingerprint == '' }}"
|
|
||||||
|
|
||||||
- name: 💬 Drop a comment
|
- name: 💬 Drop a comment
|
||||||
uses: marocchino/sticky-pull-request-comment@v2
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
if: ${{ github.event_name == 'pull_request' && steps.fingerprint.outputs.fingerprint-diff != '[]' }}
|
if: ${{ steps.fingerprint.outputs.includes-changes }}
|
||||||
with:
|
with:
|
||||||
header: fingerprint-diff
|
header: fingerprint-diff
|
||||||
message: |
|
message: |
|
||||||
The Pull Request introduced fingerprint changes against the base commit: ${{ steps.fingerprint.outputs.previous-git-commit }}
|
The Pull Request introduced fingerprint changes against the base commit:
|
||||||
<details><summary>Fingerprint diff</summary>
|
<details><summary>Fingerprint diff</summary>
|
||||||
|
|
||||||
```json
|
```json
|
||||||
${{ steps.fingerprint.outputs.fingerprint-diff }}
|
${{ steps.fingerprint.outputs.diff }}
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -152,7 +142,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 💬 Delete comment
|
- name: 💬 Delete comment
|
||||||
uses: marocchino/sticky-pull-request-comment@v2
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
if: ${{ github.event_name == 'pull_request' && steps.fingerprint.outputs.fingerprint-diff == '[]' }}
|
if: ${{ !steps.fingerprint.outputs.includes-changes }}
|
||||||
with:
|
with:
|
||||||
header: fingerprint-diff
|
header: fingerprint-diff
|
||||||
delete: true
|
delete: true
|
||||||
|
|||||||
Reference in New Issue
Block a user