fix: Completely disable submodules in all GitHub Actions workflows #10
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache-dependency-path: go.sum | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run go fmt check | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "Code is not formatted. Run 'go fmt ./...'" | |
| gofmt -s -d . | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: | | |
| CGO_ENABLED=1 go build -o autoar ./cmd/autoar | |
| chmod +x autoar | |
| - name: Test build | |
| run: | | |
| ./autoar --help || true | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@master | |
| with: | |
| args: '-no-fail -fmt json -out gosec-report.json ./...' | |
| - name: Upload Gosec results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: gosec-report | |
| path: gosec-report.json | |