You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.1 KiB

  1. # Copyright 2020 IT Projects Labs
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. name: "DINAR: update repo's readme"
  15. on:
  16. push:
  17. paths:
  18. - ".DINAR/build-date.txt"
  19. - ".DINAR/config.yaml"
  20. - ".github/workflows/DINAR-readme.yml"
  21. - "*/__manifest__.py"
  22. jobs:
  23. repo_readme:
  24. runs-on: ubuntu-latest
  25. if:
  26. "! endsWith(github.repository, '-store') && startsWith(github.repository,
  27. 'itpp-labs/')"
  28. steps:
  29. - name: Checkout Repo
  30. uses: actions/checkout@v2
  31. with:
  32. path: REPO
  33. - name: Checkout DINAR
  34. uses: actions/checkout@v2
  35. with:
  36. path: DINAR
  37. repository: itpp-labs/DINAR-fork
  38. ref: master
  39. - uses: actions/setup-python@v1
  40. with:
  41. python-version: "3.7.x"
  42. - name: Install python tools
  43. run: |
  44. pip install plumbum pyyaml
  45. - name: Generate readme
  46. run: |
  47. REF=${GITHUB_BASE_REF:-${GITHUB_REF}}
  48. BRANCH=${REF##*/}
  49. cd REPO
  50. python ../DINAR/workflow-files/generate-repo-readme.py $BRANCH "${{ github.repository.description }}"
  51. - name: Commit updates
  52. uses: stefanzweifel/git-auto-commit-action@v4
  53. with:
  54. repository: .
  55. commit_user_name: Mitchell Admin
  56. commit_user_email: itpp-bot@users.noreply.github.com
  57. # Commit may contain other updates, but in usual flow it's only module list
  58. commit_message: |
  59. :construction_worker_man: Update module list
  60. Sent from Github Actions (see .github/workflows/DINAR-readme.yml )