update_json.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: Update JSON Data
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: 0 0 * * *
  6. jobs:
  7. update_cpython_tags:
  8. runs-on: ubuntu-latest
  9. name: Update CPython JSON tags and trees
  10. steps:
  11. - name: Checkout code
  12. uses: actions/checkout@v3
  13. with:
  14. ref: master
  15. - name: Setup NodeJS 16
  16. uses: actions/setup-node@v3
  17. with:
  18. node-version: 16
  19. - name: Install dependencies
  20. run: npm ci
  21. - name: Update JSON data
  22. run: |
  23. node ./.github/scripts/generate_tags.js
  24. node ./.github/scripts/generate_trees.js
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  27. - name: Update jest snapshots
  28. run: npm run test-ci -- -u
  29. env:
  30. FORCE_COLOR: 3
  31. - name: Create or update pull request
  32. uses: peter-evans/create-pull-request@v5
  33. with:
  34. commit-message: Update CPython JSON data
  35. branch: create-pull-request/cpython-json
  36. delete-branch: true
  37. title: Update CPython JSON data
  38. body: |
  39. Automated JSON data update by [update_json.yml](https://github.com/MatteoH2O1999/build-and-install-python/tree/master/.github/workflows/update_json.yml)
  40. assignees: ${{ github.repository_owner }}
  41. author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  42. audit_dependencies:
  43. runs-on: ubuntu-latest
  44. name: Audit dependencies
  45. steps:
  46. - name: Checkout code
  47. uses: actions/checkout@v3
  48. with:
  49. ref: master
  50. - name: Setup NodeJS 16
  51. uses: actions/setup-node@v3
  52. with:
  53. node-version: 16
  54. - name: Install dependencies
  55. run: npm ci
  56. - name: Audit dependencies
  57. run: npm audit
  58. - name: Fix dependencies vulnerabilities
  59. run: npm audit fix
  60. - name: Create or update pull request
  61. uses: peter-evans/create-pull-request@v5
  62. with:
  63. commit-message: Audit dependencies
  64. branch: create-pull-request/audit-dependencies
  65. delete-branch: true
  66. title: Fix dependencies vulnerabilities
  67. body: |
  68. Automated dependencies fix by [update_json.yml](https://github.com/MatteoH2O1999/build-and-install-python/tree/master/.github/workflows/update_json.yml)
  69. assignees: ${{ github.repository_owner }}
  70. author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>