From c46b4b9ccafcfc88281e2d9c183fa520ef8467b9 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Sat, 11 Nov 2023 18:22:36 +0100 Subject: [PATCH] Update changesets, block automation on fork --- .github/workflows/changesets-status.yml | 13 ++++++------- .github/workflows/pr-automation.yml | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/changesets-status.yml b/.github/workflows/changesets-status.yml index 170c77c79a3..1f18ed6a598 100644 --- a/.github/workflows/changesets-status.yml +++ b/.github/workflows/changesets-status.yml @@ -6,18 +6,17 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout Repo - uses: actions/checkout@v3 - - name: Extract branch name - id: extract_branch - run: | - - echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + uses: actions/checkout@v4 + with: + sparse-checkout: ./.changeset + - name: Changeset file lookup env: GH_TOKEN: ${{ github.token }} PR_BRANCH: ${{ steps.extract_branch.outputs.branch }} + PR_ID: ${{ github.event.number }} run: | - files=$(gh pr diff "$PR_BRANCH" --name-only) + files=$(gh pr diff "$PR_ID" --name-only) if [[ $files =~ \.changeset\/.*.md ]]; then echo "Changesets found!" else diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index 871c8128153..8d6851ef628 100644 --- a/.github/workflows/pr-automation.yml +++ b/.github/workflows/pr-automation.yml @@ -9,6 +9,7 @@ concurrency: jobs: prepare_variables: runs-on: ubuntu-22.04 + if: github.event.pull_request.head.repo.full_name == 'saleor/saleor-dashboard' outputs: POOL_NAME: ${{ steps.generate.outputs.POOL_NAME }} POOL_INSTANCE: ${{ steps.generate.outputs.POOL_INSTANCE }}