Update i18n-curriculum Submodule #9
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
name: Update i18n-curriculum Submodule | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: | |
# - main | |
env: | |
GITHUB_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} | |
CROWDIN_API_URL: 'https://freecodecamp.crowdin.com/api/v2/' | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }} | |
jobs: | |
update-i18n-curriculum-submodule: | |
name: Update i18n Submodule | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
fail-fast: true | |
steps: | |
- name: Checkout Source Files | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} | |
sparse-checkout: . | |
- name: Clone freeCodeCamp Repo | |
run: git clone https://github.com/moT01/fcc.git | |
- name: Debug | |
run: | | |
pwd | |
ls -la | |
git status | |
# - name: Ensure correct submodule path and initialization | |
# working-directory: fcc | |
# run: | | |
# git submodule sync | |
# git submodule update --init --recursive | |
- name: Debug | |
working-directory: fcc | |
run: | | |
git status | |
git diff | |
git status | |
git diff | |
- name: Update submodule | |
working-directory: fcc | |
run: | | |
git config --global user.email "${{ secrets.ACTIONS_CAMPERBOT_EMAIL }}" | |
git config --global user.name "camperbot" | |
git checkout -b chore/update-i18n-curriculum-submodule | |
git submodule update --remote i18n-curriculum | |
git add . | |
git commit -m "chore(curriculum): Update i18n-curriculum submodule" | |
git remote add freecodecamp https://github.com/moT01/fcc.git | |
git push -u freecodecamp chore/update-i18n-curriculum-submodule | |
- name: Debug 2 | |
working-directory: fcc | |
run: | | |
git status | |
git diff | |
cd i18n-curriculum | |
git status | |
git diff | |
# Create Commit | |
# - name: Commit Changes | |
# uses: freecodecamp/crowdin-action@main | |
# env: | |
# PLUGIN: 'commit-changes' | |
# GH_USERNAME: 'camperbot' | |
# GH_EMAIL: ${{ secrets.ACTIONS_CAMPERBOT_EMAIL }} | |
# GH_BRANCH: 'chore/update-submodule' | |
# GH_MESSAGE: 'chore(i18n,learn): update i18n-curriculum submodule' | |
# # Create PR | |
# - name: Create PR | |
# uses: freecodecamp/crowdin-action@main | |
# env: | |
# PLUGIN: 'pull-request' | |
# GH_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} | |
# BRANCH: 'chore/update-submodule' | |
# # Todo: Change to fcc repo after this is transferred | |
# REPOSITORY: 'moT01/fcc' | |
# BASE: 'main' | |
# TITLE: 'chore(i18n,learn): update i18n-curriculum submodule' | |
# BODY: 'This PR was opened auto-magically by Camperbot.' |