From 6c65dd3b3624e2e57daeb3bb6c94eb36d3656367 Mon Sep 17 00:00:00 2001 From: Hailey Date: Sun, 26 May 2024 18:43:03 -0700 Subject: [PATCH] update pr workflow --- .github/workflows/pull-request-commit.yml | 26 +++++++---------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pull-request-commit.yml b/.github/workflows/pull-request-commit.yml index 6c796fd7c4..e2cf64f5fa 100644 --- a/.github/workflows/pull-request-commit.yml +++ b/.github/workflows/pull-request-commit.yml @@ -21,7 +21,7 @@ permissions: jobs: webpack-analyzer: 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: - name: ⬇️ Checkout uses: actions/checkout@v4 @@ -96,8 +96,7 @@ jobs: test-suite-fingerprint: runs-on: ubuntu-22.04 - if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }} - concurrency: fingerprint-${{ github.event_name != 'pull_request' && 'main' || github.run_id }} + if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request'}} steps: - name: ⬇️ Checkout uses: actions/checkout@v4 @@ -117,32 +116,23 @@ jobs: - name: ⚙️ Install Dependencies 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 id: fingerprint - uses: expo/expo-github-action/fingerprint@main + uses: bluesky-social/github-actions/fingerprint-native@main with: - previous-git-commit: ${{ steps.base-commit.outputs.base-commit }} - - - 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 == '' }}" + profile: pull-request - name: 💬 Drop a comment 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: header: fingerprint-diff 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:
Fingerprint diff ```json - ${{ steps.fingerprint.outputs.fingerprint-diff }} + ${{ steps.fingerprint.outputs.diff }} ```
@@ -152,7 +142,7 @@ jobs: - name: 💬 Delete comment 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: header: fingerprint-diff delete: true