Merge pull request #620 from nextcloud/ci/noid/update-workflow-109
ci: Update workflows
This commit is contained in:
Коммит
8d06d6a4af
|
@ -18,6 +18,28 @@ 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: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }}
|
||||
run: |
|
||||
echo 'Can not execute /compile on forks'
|
||||
exit 1
|
||||
|
||||
- name: Check actor permission
|
||||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
|
||||
with:
|
||||
|
@ -87,7 +109,7 @@ jobs:
|
|||
|
||||
- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}"
|
||||
|
||||
|
||||
- name: Rebase to ${{ needs.init.outputs.base_ref }}
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'rebase') }}
|
||||
run: |
|
||||
|
@ -107,7 +129,7 @@ jobs:
|
|||
run: |
|
||||
git add ${{ github.workspace }}${{ needs.init.outputs.git_path }}
|
||||
git commit --signoff -m 'chore(assets): Recompile assets'
|
||||
|
||||
|
||||
- name: Commit fixup
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'fixup') }}
|
||||
run: |
|
||||
|
@ -121,7 +143,7 @@ jobs:
|
|||
git commit --amend --no-edit --signoff
|
||||
# Remove any [skip ci] from the amended commit
|
||||
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
|
||||
|
||||
|
||||
- name: Push normally
|
||||
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
|
||||
run: git push origin ${{ needs.init.outputs.head_ref }}
|
||||
|
|
Загрузка…
Ссылка в новой задаче