Automate reuse lint using github action #151
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: PR-verify | |
on: | |
pull_request: | |
env: | |
GO_VERSION: 1.21.5 | |
NODE_VERSION: 18.x | |
jobs: | |
verify: | |
name: Verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Go version | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Verify | |
run: | | |
make verify | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
lint-repo: | |
name: Lint Repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup Node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Execute repolinter | |
run: | | |
echo "Installing repolinter" | |
npm install -g [email protected] | |
echo "Executing repolinter" | |
repolinter --rulesetFile repolinter.json --dryRun . | |
echo "Repolinter execution completed" |