Skip to content

Feature/ci workflows #8

Feature/ci workflows

Feature/ci workflows #8

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: Grant execute permissions
run: chmod +x *
working-directory: ./scripts
- 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