Merge pull request #45 from renovate-bot/renovate/routine-dependency-… #13
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - yamllint | |
| - actionlint | |
| - modernize | |
| - golangci-lint | |
| - shfmt | |
| - license | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Run ${{ matrix.target }} | |
| run: make -f lint.Makefile ${{ matrix.target }} | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Set up Go | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install dependencies | |
| run: sudo ./hack/install-deps.sh dev | |
| - name: Run tests | |
| run: go test ./... | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Build binary | |
| run: | | |
| docker buildx create --use | |
| docker buildx bake binary \ | |
| --set "*.cache-from=type=gha,scope=ci-build" \ | |
| --set "*.cache-to=type=gha,mode=max,scope=ci-build" | |
| success: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - test | |
| - build | |
| if: always() | |
| steps: | |
| - name: Check CI result | |
| run: | | |
| for result in ${{ join(needs.*.result, ' ') }}; do | |
| if [[ "$result" != "success" ]]; then | |
| exit 1 | |
| fi | |
| done |