meta-deploys-detect-change-type.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. # Add a GitHub Check to commits in "master" that specifies the "type" of files that were changed
  2. # ex: "only frontend", "only backed", or "fullstack"
  3. name: meta(deploy)
  4. on:
  5. push:
  6. branches:
  7. - master
  8. jobs:
  9. files-changed:
  10. name: detect what files changed
  11. runs-on: ubuntu-20.04
  12. steps:
  13. - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  14. - name: Check for file changes
  15. uses: getsentry/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
  16. id: changes
  17. with:
  18. list-files: shell
  19. token: ${{ github.token }}
  20. filters: .github/file-filters.yml
  21. - name: Create GitHub job
  22. uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # v6.3.3
  23. with:
  24. script: |
  25. require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/deploy`).updateChangeType({
  26. github,
  27. context,
  28. fileChanges: ${{ toJson(steps.changes.outputs) }}
  29. });