Skip to content

Commit

Permalink
Add another action
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-friedberger committed Sep 5, 2024
1 parent bb1a127 commit 3afd1dd
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/fmt-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: fmt-pr

on:
pull_request:

permissions:
pull-requests: write

jobs:
validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: run validations
id: fmt
run: |
cd tools
if go run ./psltool fmt -d ../public_suffix_list.dat; then
echo 'msg="Nothing to format."' >> "$GITHUB_OUTPUT"
else
echo 'msg="Formatting needs to be fixed."' >> "$GITHUB_OUTPUT"
fi
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
"Hello, world! :wave:"
"${{ steps.fmt.outputs.msg }}"

0 comments on commit 3afd1dd

Please sign in to comment.