|
1 | 1 | name: Update README |
2 | | - |
3 | 2 | on: |
4 | 3 | push: |
5 | 4 | branches: [ main ] |
|
10 | 9 | runs-on: ubuntu-latest |
11 | 10 |
|
12 | 11 | steps: |
13 | | - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 12 | + - name: Checkout Code |
| 13 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v3 |
| 14 | + with: |
| 15 | + fetch-depth: 3 |
| 16 | + token: ${{ secrets.GITHUB_TOKEN }} |
14 | 17 |
|
15 | 18 | - name: Update README |
16 | | - uses: npalm/action-docs-action@b1dd20339140224c1ffef389467e4fece8dc416b # v3.1.2 |
| 19 | + uses: npalm/action-docs-action@b1dd20339140224c1ffef389467e4fece8dc416b |
17 | 20 | with: |
18 | | - readme: ./README.md |
19 | | - actionFile: ./action.yml |
| 21 | + readme: README.md |
| 22 | + sourceFile: action.yml |
20 | 23 | tocLevel: 2 |
21 | 24 | lineBreaks: LF |
22 | 25 |
|
23 | | - - name: commit and push |
24 | | - uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1 |
25 | | - with: |
26 | | - commit_message: "Auto-update README.md" |
27 | | - branch: "update-readme" |
28 | | - push_options: '--force' |
29 | | - create_branch: true |
30 | | - |
31 | | - - name: Create pull request |
32 | | - uses: devops-infra/action-pull-request@a650fadebe990f25fa1e09369bf95d4a9b45ea2b # v0.6.1 |
| 26 | + # Create pull request if applicable (for now works only on PR from same repository, not from forks) |
| 27 | + - name: Create Pull Request with applied fixes |
| 28 | + id: cpr |
| 29 | + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # ratchet:peter-evans/create-pull-request@v4 |
33 | 30 | with: |
34 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
35 | | - source_branch: update-readme |
36 | | - target_branch: main |
37 | | - label: automated |
38 | | - title: Update README.md |
39 | | - body: "Automatically updated contents of README.md based on an updated action.yml file" |
| 31 | + commit-message: "Auto-update README.md" |
| 32 | + title: "Update Readme.md" |
| 33 | + labels: bot |
| 34 | + env: |
| 35 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 36 | + - name: Create PR output |
| 37 | + run: | |
| 38 | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
| 39 | + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
0 commit comments