Skip to content

Commit

Permalink
Update detect_api_changes.yml (#1935)
Browse files Browse the repository at this point in the history
# Summary
- Applying the fork fix again
See previous PR: #1923

# Ticket

<ticket>
COIOS-000
</ticket>
  • Loading branch information
goergisn authored Jan 6, 2025
1 parent a4d1179 commit 66bfdc3
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/detect_api_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ on:
required: true

jobs:

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

steps:
- uses: actions/checkout@v4
- uses: n1hility/cancel-previous-runs@v3
Expand All @@ -35,13 +34,20 @@ jobs:

- name: 👾 Define Diff Versions
run: |
NEW="${{ env.source }}~${{ env.githubRepo }}"
# 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/* ]]
then
LATEST_TAG=$(git describe --tags --abbrev=0)
OLD="$LATEST_TAG~${{ env.githubRepo }}"
else
OLD="${{ env.target }}~${{ env.githubRepo }}"
OLD="$LATEST_TAG~${{ env.baseGithubRepo }}"
fi
# Providing the output to the environment
Expand All @@ -50,11 +56,13 @@ jobs:
env:
source: '${{ github.event.inputs.new || github.head_ref }}'
target: '${{ github.event.inputs.old || github.event.pull_request.base.ref }}'
githubRepo: '${{github.server_url}}/${{github.repository}}.git'
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'

- name: 🔍 Detect Changes
uses: Adyen/[email protected]
if: env.skip_workflow != 'true'
uses: Adyen/[email protected]
id: public_api_diff
with:
platform: "iOS"
Expand Down

0 comments on commit 66bfdc3

Please sign in to comment.