Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/generate-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-versions: [24.x]
node-version: [24.x]
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref || github.ref_name }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/checkout@v6
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -29,14 +29,13 @@ jobs:
- name: Check for changes
id: check-changes
run: |
DIFF=$(git diff ${{ github.head_ref || github.ref_name }})
if [ -z "$DIFF" ]; then
if git diff --quiet src/messages.xlf; then
echo "NO_CHANGES=true" >> $GITHUB_ENV
else
echo "NO_CHANGES=false" >> $GITHUB_ENV
fi
- name: Commit messages
if: env.NO_CHANGES == 'false'
- name: Commit messages to main project
if: env.NO_CHANGES == 'false' && github.event.pull_request.head.repo.full_name == github.repository
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
Expand All @@ -45,3 +44,8 @@ jobs:
git push
env:
GITHUB_TOKEN: ${{ secrets.token }}
- name: Verify messages are up to date on forked project
if: env.NO_CHANGES == 'false' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "Error: src/messages.xlf is out of date. Run 'npm run extract-i18n' and commit the updated file."
exit 1
4 changes: 0 additions & 4 deletions .github/workflows/other-branch-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ name: Non-develop branch PR workflows
on:
pull_request:
branches:
- '*'
- '*/*'
- '**'
- '!develop'
jobs:
test-coverage:
uses: WISE-Community/WISE-Client/.github/workflows/test-coverage.yml@develop
secrets:
test_reporter: ${{secrets.CC_TEST_REPORTER_ID}}

generate-messages:
needs: test-coverage
Expand Down
Loading