Skip to content

Feature/ci workflows #7

Feature/ci workflows

Feature/ci workflows #7

Workflow file for this run

name: Check Git diffs
on:
pull_request:
branches: [main]
jobs:
check-diffs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Go 1.21.x 🐹
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Install golangci-lint package 📦
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Auto-format and lint Go
run: |
./format-and-lint.sh
working-directory: ./scripts
- name: Check diffs
run: |
status=$(git status --porcelain=v1)
if [[ -n "$status" ]]; then
git diff
exit 1
fi