Skip to content

Commit

Permalink
fix: enforce master branch to pr
Browse files Browse the repository at this point in the history
  • Loading branch information
tiankaima committed Jan 22, 2024
1 parent 1050aa2 commit b660688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
globs: "**/*.md"

- name: Determine if a PR should be submitted
if: github.ref == 'refs/heads/master'
id: file_changes
run: |
if [[ -z $(git diff --name-only) ]]; then
Expand All @@ -37,7 +38,7 @@ jobs:
fi
- name: Submit PR if mdl changes files
if: steps.file_changes.outputs.should_submit == 'true'
if: steps.file_changes.outputs.should_submit == 'true' && github.ref == 'refs/heads/master'
uses: peter-evans/create-pull-request@v5
with:
commit-message: "MarkdownLint auto fix from GitHub Actions run ${{ github.run_number }}"
Expand Down

0 comments on commit b660688

Please sign in to comment.