name: Dependabot on: pull_request: branches: - master paths: - .github/workflows/dependabot.yml - cmd/** - internal/** - pkg/** - .dockerignore - .golangci.yml - Dockerfile - go.mod - go.sum jobs: verify: if: ${{ github.actor == 'dependabot[bot]' }} runs-on: ubuntu-latest env: DOCKER_BUILDKIT: "1" steps: - uses: actions/checkout@v3 - name: Build test image run: docker build --target test -t test-container . - name: Run tests in test container run: | touch coverage.txt docker run --rm \ -v "$(pwd)/coverage.txt:/tmp/gobuild/coverage.txt" \ test-container - name: Build final image run: docker build -t final-image .