mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2025-01-03 11:25:51 -05:00
Merge pull request #186 from scratchfoundation/fix-release-after-tx-pull
More GitHub Actions maintenance
This commit is contained in:
commit
eb429e8848
3 changed files with 18 additions and 5 deletions
3
.github/workflows/ci-cd.yml
vendored
3
.github/workflows/ci-cd.yml
vendored
|
@ -22,8 +22,7 @@ jobs:
|
|||
TRIGGER_DEPLOY: ${{ startsWith(github.ref, 'refs/heads/master') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: wagoid/commitlint-github-action@v5
|
||||
if: github.event_name == 'pull_request'
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "npm"
|
||||
|
|
13
.github/workflows/commitlint.yml
vendored
Normal file
13
.github/workflows/commitlint.yml
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
name: Lint commit messages
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: wagoid/commitlint-github-action@v5
|
7
.github/workflows/daily-tx-pull.yml
vendored
7
.github/workflows/daily-tx-pull.yml
vendored
|
@ -41,18 +41,19 @@ jobs:
|
|||
npm run test
|
||||
|
||||
- name: Commit translation updates
|
||||
id: commit
|
||||
run: |
|
||||
git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
git add .
|
||||
if git diff --cached --exit-code --quiet; then
|
||||
echo "MADE_CHANGES=false" >> "$GITHUB_OUTPUT"
|
||||
echo "Nothing to commit."
|
||||
echo "::set-env name=MADE_CHANGES::false"
|
||||
else
|
||||
git commit -m "pull new editor translations from Transifex"
|
||||
echo "MADE_CHANGES=true" >> "$GITHUB_OUTPUT"
|
||||
git push origin HEAD:master
|
||||
echo "::set-env name=MADE_CHANGES::true"
|
||||
fi
|
||||
- name: Start CI/CD workflow if changes were made
|
||||
if: env.MADE_CHANGES == 'true'
|
||||
if: steps.commit.outputs.MADE_CHANGES == 'true'
|
||||
uses: ./.github/workflows/ci-cd.yml
|
||||
|
|
Loading…
Reference in a new issue