diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-07-16 15:27:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-16 15:27:08 +0200 |
commit | 2f9fcc22aec918a9d07603b5e481d43bfb980ba0 (patch) | |
tree | ce72bd18dbd0541107ad666fe0dc1b253d229c4b | |
parent | bb1f27f3dfb286bc17bf2e6eb0699fe3a4e7ed12 (diff) | |
parent | fe90e97f73f153765e3f0f20876c1f2373081fc4 (diff) | |
download | nextcloud-server-2f9fcc22aec918a9d07603b5e481d43bfb980ba0.tar.gz nextcloud-server-2f9fcc22aec918a9d07603b5e481d43bfb980ba0.zip |
Merge pull request #46559 from nextcloud/ci/noid/fix-compile-command
fix(CI): Fix compile command
-rw-r--r-- | .github/workflows/command-compile.yml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index c071899bd02..5c59aa23569 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -26,8 +26,24 @@ jobs: base_ref: ${{ steps.comment-branch.outputs.base_ref }} steps: + - name: Get repository from pull request comment + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + id: get-repository + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const pull = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + + const repositoryName = pull.data.head?.repo?.full_name + console.log(repositoryName) + return repositoryName + - name: Disabled on forks - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} + if: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }} run: | echo 'Can not execute /compile on forks' exit 1 |