Skip to content

Commit ffa77bf

Browse files
Merge pull request #21 from philips-software/chore/fix-readme
chore: fix update readme
2 parents a8c255b + 3c2b5bb commit ffa77bf

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Update README
2-
32
on:
43
push:
54
branches: [ main ]
@@ -10,30 +9,31 @@ jobs:
109
runs-on: ubuntu-latest
1110

1211
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 }}
1417

1518
- name: Update README
16-
uses: npalm/action-docs-action@b1dd20339140224c1ffef389467e4fece8dc416b # v3.1.2
19+
uses: npalm/action-docs-action@b1dd20339140224c1ffef389467e4fece8dc416b
1720
with:
18-
readme: ./README.md
19-
actionFile: ./action.yml
21+
readme: README.md
22+
sourceFile: action.yml
2023
tocLevel: 2
2124
lineBreaks: LF
2225

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
3330
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

Comments
 (0)