File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Pull Request Check
22
3- on : [ pull_request ]
3+ on :
4+ pull_request_target :
5+ types :
6+ - opened
7+ - synchronize
8+ - labeled
9+ - reopened
410
511jobs :
6- compliant :
12+ check-user-trust :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ is-trusted : ${{ steps.check.outputs.is_trusted }}
16+ steps :
17+ - name : Check if PR sender is trusted
18+ id : check
19+ run : |
20+ ASSOC="${{ github.event.sender.author_association }}"
21+ echo "Sender association: $ASSOC"
22+ if [[ "$ASSOC" == "OWNER" || "$ASSOC" == "MEMBER" || "$ASSOC" == "COLLABORATOR" ]]; then
23+ echo "trusted=true" >> $GITHUB_OUTPUT
24+ else
25+ echo "trusted=false" >> $GITHUB_OUTPUT
26+ fi
27+
28+ compliant-check :
29+ needs : check-user-trust
30+ if : needs.check-user-trust.outputs.is_trusted == 'true'
731 runs-on : ubuntu-latest
832 steps :
933 - uses : actions/checkout@v4
1640 - name : Check Spell
1741 uses : crate-ci/typos@master
1842
19- lint :
43+ golangci-lint :
44+ needs : check-user-trust
45+ if : needs.check-user-trust.outputs.is_trusted == 'true'
2046 runs-on : ubuntu-latest
2147 steps :
2248 - uses : actions/checkout@v4
3460 uses : golangci/golangci-lint-action@v6
3561 with :
3662 version : latest
63+ only-new-issues : true
You can’t perform that action at this time.
0 commit comments