Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | |
# SPDX-License-Identifier: MIT | |
name: Transifex conventional commits | |
on: | |
pull_request: | |
types: [opened, ready_for_review, reopened, synchronize] | |
permissions: | |
contents: read | |
concurrency: | |
group: transifex-conventional-rebase-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
transifex-conventional-rebase: | |
name: Rebase transifex PR with conventional commits | |
if: github.event.pull_request.user.login == 'transifex-integration[bot]' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.COMMAND_BOT_PAT }} | |
ref: ${{ github.head_ref }} | |
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup git | |
if: failure() | |
run: | | |
git config --local user.email 'nextcloud-command@users.noreply.github.com' | |
git config --local user.name 'nextcloud-command' | |
- name: Rebase on failure | |
if: failure() | |
run: | | |
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}' | |
git rebase --exec 'git commit --amend --no-verify -m "chore(l10n): $(git show -s --format=%s)"' 'HEAD~${{ github.event.pull_request.commits }}' | |
git push --force --set-upstream origin ${{ github.head_ref }} | |
# We already have the block-unconventional-commits action to fail if necessary | |
- name: Success | |
if: always() | |
run: | | |
echo "Success" | |
exit 0 |