Merge pull request #221 from nextcloud/ci/noid/update-workflow-109

ci: Update workflows
This commit is contained in:
Joas Schilling 2024-09-10 10:37:59 +02:00 коммит произвёл GitHub
Родитель 051c290f96 492cedc803
Коммит 1b37ed611f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 18 добавлений и 2 удалений

20
.github/workflows/command-compile.yml поставляемый
Просмотреть файл

@ -17,10 +17,26 @@ jobs:
head_ref: ${{ steps.comment-branch.outputs.head_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 approve PRs from forks'
echo 'Can not execute /compile on forks'
exit 1
- name: Check actor permission