@@ -12,11 +12,16 @@ jobs:
12
12
- name : Checkout
13
13
uses : actions/checkout@v2
14
14
15
- # - name: Lint
16
- # uses: golangci/golangci-lint-action@v2
17
- # with:
18
- # version: v1.32.2
19
- # args: --timeout=5m
15
+ - name : Ensure Go Version
16
+ uses : actions/setup-go@v2
17
+ with :
18
+ go-version : ' ^1.16'
19
+
20
+ - name : Lint
21
+ uses : golangci/golangci-lint-action@v2
22
+ with :
23
+ version : v1.32.2
24
+ args : --timeout=5m
20
25
21
26
- name : Ensure etcd
22
27
id : Ensure-etcd
@@ -50,26 +55,26 @@ jobs:
50
55
- name : Run tests
51
56
run : make test
52
57
53
- # - name: Figure out if running fork PR
54
- # id: fork
55
- # run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"'
58
+ - name : Figure out if running fork PR
59
+ id : fork
60
+ run : ' ["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"'
56
61
57
- # - name: Docker Login
58
- # uses: docker/login-action@v1
59
- # with:
60
- # registry: ${{ secrets.DOCKER_REGISTRY }}
61
- # username: ${{ secrets.DOCKER_REGISTRY_USER }}
62
- # password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
63
- # if: steps.fork.outputs.is_fork_pr == 'false'
62
+ - name : Docker Login
63
+ uses : docker/login-action@v1
64
+ with :
65
+ registry : ${{ secrets.DOCKER_REGISTRY }}
66
+ username : ${{ secrets.DOCKER_REGISTRY_USER }}
67
+ password : ${{ secrets.DOCKER_REGISTRY_TOKEN }}
68
+ if : steps.fork.outputs.is_fork_pr == 'false'
64
69
65
- # - name: Build Docker image
66
- # run: |
67
- # export DOCKER_TAG=pr-${GITHUB_HEAD_REF}
68
- # make docker-build
70
+ - name : Build Docker image
71
+ run : |
72
+ export DOCKER_TAG=pr-${GITHUB_HEAD_REF}
73
+ make docker-build
69
74
70
- # - name: Push Docker image
71
- # run: |
72
- # # pull request images are prefixed with 'pr' to prevent them from overriding released images
73
- # export DOCKER_TAG=pr-${GITHUB_HEAD_REF}
74
- # make docker-push
75
- # if: steps.fork.outputs.is_fork_pr == 'false'
75
+ - name : Push Docker image
76
+ run : |
77
+ # pull request images are prefixed with 'pr' to prevent them from overriding released images
78
+ export DOCKER_TAG=pr-${GITHUB_HEAD_REF}
79
+ make docker-push
80
+ if : steps.fork.outputs.is_fork_pr == 'false'
0 commit comments