The Free Software Media System - Server Backend & API
Checkout common ancestor for comparison in OpenAPI workflow (#8985)
Niels van Velzenc73c7b60506e
diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.ymlindex f426357a9a..5dee03ef88 100644--- a/.github/workflows/openapi.yml+++ b/.github/workflows/openapi.yml@@ -41,7 +41,15 @@ jobs:- name: Checkout repositoryuses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3with:- ref: ${{ github.base_ref }}+ ref: ${{ github.event.pull_request.head.sha }}+ repository: ${{ github.event.pull_request.head.repo.full_name }}+ fetch-depth: 0+ - name: Checkout common ancestor+ run: |+ git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}+ git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules upstream +refs/heads/*:refs/remotes/upstream/* +refs/tags/*:refs/tags/*+ ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/${{ github.head_ref }})+ git checkout --progress --force $ANCESTOR_REF- name: Setup .NETuses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # tag=v3with: