diff --git a/.github/workflows/update-api-files.yml b/.github/workflows/update-api-files.yml index 59c673ea528..987456b74fe 100644 --- a/.github/workflows/update-api-files.yml +++ b/.github/workflows/update-api-files.yml @@ -37,10 +37,14 @@ jobs: git config user.name "github-actions[bot]" # If run from a PR, checkout PR branch and merge in latest changes from main branch - name: Checkout PR branch and merge main + id: checkout-pr-branch if: ${{ github.event_name != 'workflow_dispatch' }} - run: | - git checkout ${{ github.event.pull_request.head.ref }} - git merge origin/main + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Merge main into PR branch + if: ${{ steps.checkout-pr-branch.outcome == 'success' }} + run: git merge origin/main # Ensure node version is great enough - name: Use Node.js uses: actions/setup-node@v4 diff --git a/change/@azure-communication-react-1613cd0b-4030-4c16-a819-73169c2cae7f.json b/change/@azure-communication-react-1613cd0b-4030-4c16-a819-73169c2cae7f.json new file mode 100644 index 00000000000..a1ecb29103d --- /dev/null +++ b/change/@azure-communication-react-1613cd0b-4030-4c16-a819-73169c2cae7f.json @@ -0,0 +1,9 @@ +{ + "type": "patch", + "area": "fix", + "workstream": "update-api-files", + "comment": "Sanitize pr branch in update-api-files ci yaml file", + "packageName": "@azure/communication-react", + "email": "edwardlee@microsoft.com", + "dependentChangeType": "patch" +}