Skip to content

Commit a02eb89

Browse files
authored
More Release Fixes (#4)
* rebuild readme JOB_SUMMARY * pass GITHUB_TOKEN
1 parent 44ef918 commit a02eb89

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/auto-readme.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
# Update README.md nightly at 4am UTC
2121
- cron: "0 4 * * *"
2222

23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
2327
jobs:
2428
update:
2529
runs-on: ubuntu-latest
@@ -65,9 +69,10 @@ jobs:
6569
- name: Create Pull Request
6670
# This action will not create or change a pull request if there are no changes to make.
6771
# If a PR of the auto-update/readme branch is open, this action will just update it, not create a new PR.
68-
uses: cloudposse/actions/github/create-pull-request@0.30.0
72+
id: pr
73+
uses: peter-evans/create-pull-request@v5
6974
with:
70-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
75+
token: ${{ secrets.GITHUB_TOKEN }}
7176
commit-message: Update README.md and docs
7277
title: Update README.md and docs
7378
body: |-
@@ -84,3 +89,10 @@ jobs:
8489
auto-update
8590
no-release
8691
readme
92+
93+
- name: Check outputs
94+
if: ${{ steps.pr.outputs.pull-request-number }}
95+
run: |
96+
echo "Pull Request Number - ${{ steps.pr.outputs.pull-request-number }}"
97+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
98+
cat README.md >> $GITHUB_STEP_SUMMARY

.github/workflows/release-branch.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ jobs:
5353
- name: Generate readme
5454
shell: bash
5555
run: |
56+
if [ ! -f README.yaml ]; then
57+
echo "Project does not have a README.yaml. Skipping..."
58+
exit 0
59+
fi
60+
61+
# A Makefile is required for build-harness and rebuilding the README.md from the README.yaml and rebuilding the README.md from the README.yaml and rebuilding the README.md from the README.yaml and rebuilding the README.md from the README.yaml
62+
if [ ! -f Makefile ]; then
63+
echo "Project does not have a Makefile";
64+
exit 1
65+
fi
66+
5667
make init
5768
make readme/build
5869

0 commit comments

Comments
 (0)