Skip to content

Commit

Permalink
[PAD] Removing fork check (#1957)
Browse files Browse the repository at this point in the history
The check was moved to the diff tool action

# Summary
- Updated dectect_api_changes.yml to not check for fork PRs (Done in the
action.yml of the diff tool)

# Ticket

<ticket>
COIOS-000
</ticket>
  • Loading branch information
goergisn authored Jan 20, 2025
1 parent 953fa2b commit 79900bc
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/detect_api_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,31 @@ on:
required: true

jobs:

build:
runs-on: macos-14 # Apple Silicon Runner
runs-on: macos-14

steps:
- uses: actions/checkout@v4
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4'
xcode-version: '16.1'

- name: 🚚 Fetch repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 👾 Define Diff Versions
run: |
# Disabling this check from PRs of forked repositories because of insufficient access permissions
if [[ "${{ env.headGithubRepo }}" != "${{ env.baseGithubRepo }}" ]]; then
echo "The head repository is different from the base repository. Exiting..."
echo "skip_workflow=true" >> $GITHUB_ENV
exit 0
fi
NEW="${{ env.source }}~${{ env.headGithubRepo }}"
OLD="${{ env.target }}~${{ env.baseGithubRepo }}"
if [[ '${{ github.head_ref || env.noTargetBranch }}' == release/* ]]
if [[ '${{ env.targetBranchName || env.noTargetBranch }}' == release/* ]]
then
LATEST_TAG=$(git describe --tags --abbrev=0)
OLD="$LATEST_TAG~${{ env.baseGithubRepo }}"
Expand All @@ -59,11 +52,12 @@ jobs:
headGithubRepo: '${{github.server_url}}/${{ github.event.pull_request.head.repo.full_name || github.repository}}.git'
baseGithubRepo: '${{github.server_url}}/${{github.repository}}.git'
noTargetBranch: 'no target branch'
targetBranchName: '${{ github.head_ref }}'

# The github action automatically posts on a PR (if it's not a fork-PR)
# and/or outputs the diff to the $GITHUB_STEP_SUMMARY
- name: 🔍 Detect Changes
if: env.skip_workflow != 'true'
uses: Adyen/adyen-swift-public-api-diff@0.8.1
id: public_api_diff
with:
platform: "iOS"
new: ${{ env.NEW_VERSION }}
Expand Down

0 comments on commit 79900bc

Please sign in to comment.