reply-issue.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: auto issue
  2. on:
  3. issues:
  4. types: [opened]
  5. jobs:
  6. reply:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - name: Use Node.js ${{ matrix.node_version }}
  11. uses: actions/setup-node@v1
  12. with:
  13. node-version: ${{ matrix.node_version }}
  14. - name: Get yarn cache directory path
  15. id: yarn-cache-dir-path
  16. run: echo "::set-output name=dir::$(yarn cache dir)"
  17. - name: Cache yarn cache
  18. uses: actions/cache@v2
  19. id: cache-yarn-cache
  20. with:
  21. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  22. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  23. restore-keys: |
  24. ${{ runner.os }}-yarn-
  25. - name: Cache node_modules
  26. id: cache-node-modules
  27. uses: actions/cache@v2
  28. with:
  29. path: node_modules
  30. key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
  31. restore-keys: |
  32. ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
  33. - run: yarn --ignore-engines
  34. if: |
  35. steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
  36. steps.cache-node-modules.outputs.cache-hit != 'true'
  37. - run: yarn add @octokit/core
  38. - name: Auto reply to issue
  39. env:
  40. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  41. ISSUE_NUMBER: ${{ github.event.issue.number }}
  42. run: node ./tests/issue.js