/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/update-compat-data.yml
81 строка
3 KB
Huáng Jùnliàng
chore: bump github actions (#17895)
24 мар 2026, 15:14
Не верифицирован
24 мар 2026, 15:14
732dd3e
Код
Авторство
О чём код?
name: Update compat data env: YARN_ENABLE_SCRIPTS: false # disable post-install scripts on: workflow_dispatch: inputs: {} schedule: - cron: "0 0 * * 5" jobs: createPullRequest: name: Update compat-table runs-on: ubuntu-latest permissions: contents: write # for Git to git push steps: - uses: actions/checkout@v6 - uses: actions/checkout@v6 with: repository: kangax/compat-table path: packages/babel-compat-data/build/compat-table - name: Use Node.js latest uses: actions/setup-node@v6 with: node-version: "*" - name: Get latest kangax/compat-table commit id: lastCommit run: echo "sha1=$(./scripts/update-compat-table/get-last-commit.sh)" >> $GITHUB_OUTPUT - name: Update compat-table commit run: echo ${{ steps.lastCommit.outputs.sha1 }} | ./scripts/update-compat-table/bump-compat-table-commit.sh - name: Check if it has been updated run: | [[ -z $(git status -s) ]] && echo "updated=false" >> $GITHUB_OUTPUT || echo "updated=true" >> $GITHUB_OUTPUT id: updated - name: Bootstrap if: steps.updated.outputs.updated == 'true' run: make bootstrap - name: Run update script if: steps.updated.outputs.updated == 'true' run: make build-compat-data - name: Commit compat-data changes if: steps.updated.outputs.updated == 'true' run: | git config user.name "Babel Bot" git config user.email "babel-bot@users.noreply.github.com" git checkout -b update-compat-data git commit -am "chore: update compat data to ${{ steps.lastCommit.outputs.sha1 }}" - name: Update tests and commit test fixtures if: steps.updated.outputs.updated == 'true' continue-on-error: true run: | yarn jest -u git commit -am "chore: update test fixtures" env: OVERWRITE: true - name: Update tests (Babel 8) and commit test fixtures if: steps.updated.outputs.updated == 'true' continue-on-error: true run: | yarn jest -u git commit -am "chore: update test fixtures for Babel 8" env: OVERWRITE: true BABEL_8_BREAKING: true - name: Push changes if: steps.updated.outputs.updated == 'true' run: | git push --force origin update-compat-data - name: Create Pull Request if: steps.updated.outputs.updated == 'true' uses: babel/actions/create-pull-request@v2 with: token: ${{ secrets.BOT_TOKEN }} branch: update-compat-data title: Update compat data description: Update compat data to [${{ steps.lastCommit.outputs.sha1 }}](https://github.com/kangax/compat-table/commit/${{ steps.lastCommit.outputs.sha1 }}). labels: | area: compat-table repo automation :robot: