diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index 09e64b5..41ee00d 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -1,11 +1,14 @@ # Run on each main branch commit, create a commit to update the README.md -name: Update Readme +name: Check and update Readme on: push: branches: - main + pull_request: + branches: + - main jobs: update-readme: @@ -19,6 +22,10 @@ jobs: - name: Update Readme run: nix run .#updateReadme - uses: EndBug/add-and-commit@v9 + if: ${{ github.event_name == 'push' }} with: push: true + - name: Output readme + if: ${{ github.event_name != 'push' }} + run: cat README.md > "$GITHUB_STEP_SUMMARY"