Merge pull request #192 from tj-actions/renovate/peter-evans-create-p… #539
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
shellcheck: | |
name: shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: shellcheck | |
uses: reviewdog/action-shellcheck@v1 | |
test: | |
name: Test remark | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, windows-2022] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Run test | |
uses: ./ | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v13.1 | |
id: verify_changed_files | |
with: | |
files: | | |
README.md | |
- name: README.md changed | |
if: steps.verify_changed_files.outputs.files_changed == 'true' && github.event_name != 'pull_request' | |
run: | | |
echo "README.md has uncommited changes" | |
exit 1 | |
- name: Create Pull Request | |
if: failure() && github.event_name != 'pull_request' | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
base: "main" | |
title: "Updated README.md" | |
branch: "chore/update-readme" | |
commit-message: "Updated README.md" | |
body: "Updated README.md" | |
token: ${{ secrets.PAT_TOKEN }} |