|
5 | 5 | branches: [main] |
6 | 6 | workflow_dispatch: |
7 | 7 |
|
8 | | -concurrency: |
9 | | - group: ${{ github.workflow }}-${{ github.ref }} |
10 | | - cancel-in-progress: true |
11 | | - |
12 | 8 | jobs: |
13 | | - tree: |
14 | | - runs-on: ubuntu-latest |
15 | | - name: readme-tree |
16 | | - steps: |
17 | | - - uses: actions/checkout@v4 |
18 | | - - name: Create README Tree |
19 | | - uses: RavelloH/readme-tree@v1.1.0 |
20 | | - with: |
21 | | - showdirectoryname: "yes" |
22 | | - - name: Generate GitHub App Token |
23 | | - uses: actions/create-github-app-token@v1 |
24 | | - id: app-token |
25 | | - with: |
26 | | - app-id: ${{ secrets.APP_ID }} |
27 | | - private-key: ${{ secrets.APP_PRIVATE_KEY }} |
28 | | - - name: Get GitHub App User ID |
29 | | - id: get-user-id |
30 | | - run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" |
31 | | - env: |
32 | | - GH_TOKEN: ${{ steps.app-token.outputs.token }} |
33 | | - - name: Create Pull Request |
34 | | - id: create-pull-request |
35 | | - uses: peter-evans/create-pull-request@v7 |
36 | | - with: |
37 | | - branch: update-readme-tree |
38 | | - commit-message: Update README Tree |
39 | | - title: Update README Tree |
40 | | - body: This PR includes new updates to the README Tree. |
41 | | - labels: chore |
42 | | - delete-branch: true |
43 | | - reviewers: devantler |
44 | | - assignees: devantler |
45 | | - signoff: true |
46 | | - token: ${{ steps.app-token.outputs.token }} |
47 | | - author: ${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com> |
48 | | - committer: ${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com> |
49 | | - sign-commits: true |
50 | | - - name: Enable Pull Request Automerge |
51 | | - if: steps.create-pull-request.outputs.pull-request-operation != 'none' |
52 | | - run: gh pr merge --merge --auto ${{ steps.create-pull-request.outputs.pull-request-number }} |
53 | | - env: |
54 | | - GH_TOKEN: ${{ steps.app-token.outputs.token }} |
55 | | - |
| 9 | + call-readme-tree-workflow: |
| 10 | + uses: devantler-tech/.github/.github/workflows/readme-tree.yaml@main |
| 11 | + secrets: inherit |
0 commit comments