Skip to content

Commit

Permalink
Merge pull request #19 from FNLB-Project/dev
Browse files Browse the repository at this point in the history
update ci
  • Loading branch information
tnfAngel authored Feb 18, 2024
2 parents b7ad1eb + 65cf69b commit 0279a8a
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@ on:
pull_request:
branches: [stable]
types: [opened, synchronize]
paths-ignore:
- '*.md'
- '.*ignore'
push:
branches: [stable]
paths-ignore:
- '*.md'
- '.*ignore'
workflow_dispatch:

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

jobs:
avoid_redundancy_lint_pretty_and_cache_deps:
lint_pretty_and_cache_deps:
runs-on: ubuntu-22.04
permissions: write-all
steps:
- name: Cancel Previous Redundant Builds
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- uses: pnpm/action-setup@v2

Expand All @@ -41,14 +46,13 @@ jobs:
prettier_options: . --write

translate:
needs: [avoid_redundancy_lint_pretty_and_cache_deps]
needs: [lint_pretty_and_cache_deps]
runs-on: ubuntu-22.04
permissions:
contents: write
contents: write
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- uses: pnpm/action-setup@v2

Expand All @@ -61,9 +65,13 @@ jobs:
run: pnpm install

- name: Translate
run: pnpm run translate
run: pnpm run start

- name: Get last commit author
id: last-commit
run: echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Sync translations
commit_user_name: FNLB Translator
commit_author: ${{ steps.last-commit.outputs.author }}
commit_message: Sync translations

0 comments on commit 0279a8a

Please sign in to comment.