mirror of https://github.com/joomla/joomla-cms.git
Use 4.2-dev in core translation workflow (#38698)
This commit is contained in:
parent
5bc297f3a5
commit
449cbafac2
|
@ -15,6 +15,6 @@ insert_final_newline = true
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.{js,json,scss,css,vue}]
|
[*.{js,json,scss,css,yml,vue}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -1,75 +1,75 @@
|
||||||
name: Create translation pull request
|
name: Create translation pull request
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ translation ]
|
branches: [ translation ]
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# Run daily at 7:26
|
# Run daily at 7:26
|
||||||
- cron: '26 7 * * *'
|
- cron: '26 7 * * *'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # for Git to git push
|
contents: write # for Git to git push
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Only run this action the translation-bot repository in the translation branch
|
# Only run this action the translation-bot repository in the translation branch
|
||||||
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}
|
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# We need the full depth to create / update the pull request against the main repo
|
# We need the full depth to create / update the pull request against the main repo
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
|
||||||
- name: Fetch latest cms changes
|
- name: Fetch latest cms changes
|
||||||
run: |
|
run: |
|
||||||
git config user.name Translation Bot
|
git config user.name Translation Bot
|
||||||
git config user.email release+translation-bot@joomla.org
|
git config user.email release+translation-bot@joomla.org
|
||||||
git remote add upstream https://github.com/joomla/joomla-cms.git
|
git remote add upstream https://github.com/joomla/joomla-cms.git
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git checkout --progress --force -B translation refs/remotes/origin/translation
|
git checkout --progress --force -B translation refs/remotes/origin/translation
|
||||||
git merge upstream/4.1-dev
|
git merge upstream/4.2-dev
|
||||||
|
|
||||||
- name: Fetch and extract translations
|
- name: Fetch and extract translations
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
|
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
|
||||||
unzip main.zip
|
unzip main.zip
|
||||||
|
|
||||||
- name: Syncing directories
|
- name: Syncing directories
|
||||||
# We use a simple copy paste syntax here if needed customization for different directories
|
# We use a simple copy paste syntax here if needed customization for different directories
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
SYNC_VERSION="v4"
|
SYNC_VERSION="v4"
|
||||||
|
|
||||||
SYNC_PATH="installation/language/"
|
SYNC_PATH="installation/language/"
|
||||||
echo ${SYNC_PATH}
|
echo ${SYNC_PATH}
|
||||||
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
|
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
|
||||||
|
|
||||||
- name: Update static error pages
|
- name: Update static error pages
|
||||||
run: |
|
run: |
|
||||||
npm ci --ignore-scripts && node build/build.js --build-pages
|
npm ci --ignore-scripts && node build/build.js --build-pages
|
||||||
|
|
||||||
- name: Create commit
|
- name: Create commit
|
||||||
run: |
|
run: |
|
||||||
git config user.name Translation Bot
|
git config user.name Translation Bot
|
||||||
git config user.email release+translation-bot@joomla.org
|
git config user.email release+translation-bot@joomla.org
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Language update"
|
git commit -m "Language update"
|
||||||
git push --force
|
git push --force
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||||
run: |
|
run: |
|
||||||
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
|
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
|
||||||
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.1-dev
|
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.2-dev
|
||||||
|
|
Loading…
Reference in New Issue