Skip to content

Commit

Permalink
Merge pull request #1984 from nextcloud/bugfix/noid/fix-compile-command
Browse files Browse the repository at this point in the history
fix(ci): Fix compile command
  • Loading branch information
nickvergessen authored Jul 24, 2024
2 parents 60313f8 + e0db14e commit 6d13ba8
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/command-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -103,7 +119,7 @@ jobs:
fallbackNpm: '^10'

- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm
Expand Down

0 comments on commit 6d13ba8

Please sign in to comment.