CI: rework Github build workflows and Dockerfile
This commit is contained in:
40
.github/workflows/pr.yml
vendored
Normal file
40
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: pull request
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
paths:
|
||||
- .github/workflows/pr.yml
|
||||
- cmd/**
|
||||
- internal/**
|
||||
- .dockerignore
|
||||
- .golangci.yml
|
||||
- Dockerfile
|
||||
- go.mod
|
||||
- go.sum
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target test .
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build --target lint .
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, lint]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Docker build
|
||||
env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: docker build .
|
||||
Reference in New Issue
Block a user