Skip to content

Commit 41ccbe9

Browse files
committed
update github action workflow
Signed-off-by: Markus Blaschke <[email protected]>
1 parent 6602a94 commit 41ccbe9

File tree

4 files changed

+48
-11
lines changed

4 files changed

+48
-11
lines changed

.github/workflows/ci-docker.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,17 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v2
13+
14+
- name: Run Gosec Security Scanner
15+
uses: securego/gosec@master
16+
with:
17+
args: ./...
18+
19+
- name: Run Golangci lint
20+
uses: golangci/golangci-lint-action@v2
21+
with:
22+
version: latest
23+
args: -E exportloopref,gofmt --timeout=30m
24+
1325
- name: Build the Docker image
1426
run: docker build . --file Dockerfile --tag webdevops/kube-pool-manager:$(date +%s)

.github/workflows/release-docker.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,25 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15+
16+
- name: Run Gosec Security Scanner
17+
uses: securego/gosec@master
18+
with:
19+
args: ./...
20+
21+
- name: Run Golangci lint
22+
uses: golangci/golangci-lint-action@v2
23+
with:
24+
version: latest
25+
args: -E exportloopref,gofmt --timeout=30m
26+
1527
- name: Docker meta
1628
id: docker_meta
17-
uses: crazy-max/ghaction-docker-meta@v1
29+
uses: docker/metadata-action@v3
1830
with:
19-
images: webdevops/kube-pool-manager,quay.io/webdevops/kube-pool-manager
20-
#tag-sha: true
31+
images: webdevops/${{ github.event.repository.name }},quay.io/webdevops/${{ github.event.repository.name }}
32+
labels: |
33+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/README.md
2134
2235
- name: Set up QEMU
2336
uses: docker/setup-qemu-action@v1

.github/workflows/scheduled-docker.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,45 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
13+
- name: Run Gosec Security Scanner
14+
uses: securego/gosec@master
15+
with:
16+
args: ./...
17+
18+
- name: Run Golangci lint
19+
uses: golangci/golangci-lint-action@v2
20+
with:
21+
version: latest
22+
args: -E exportloopref,gofmt --timeout=30m
23+
1224
- name: Docker meta
1325
id: docker_meta
14-
uses: crazy-max/ghaction-docker-meta@v1
26+
uses: docker/metadata-action@v3
1527
with:
16-
images: webdevops/kube-pool-manager,quay.io/webdevops/kube-pool-manager
17-
#tag-sha: true
28+
images: webdevops/${{ github.event.repository.name }},quay.io/webdevops/${{ github.event.repository.name }}
29+
labels: |
30+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/README.md
1831
1932
- name: Set up QEMU
2033
uses: docker/setup-qemu-action@v1
21-
34+
2235
- name: Set up Docker Buildx
2336
uses: docker/setup-buildx-action@v1
2437

2538
- name: Login to DockerHub
26-
uses: docker/login-action@v1
39+
uses: docker/login-action@v1
2740
with:
2841
username: ${{ secrets.DOCKERHUB_USERNAME }}
2942
password: ${{ secrets.DOCKERHUB_TOKEN }}
3043

3144
- name: Login to Quay
32-
uses: docker/login-action@v1
45+
uses: docker/login-action@v1
3346
with:
3447
registry: quay.io
3548
username: ${{ secrets.QUAY_USERNAME }}
3649
password: ${{ secrets.QUAY_TOKEN }}
37-
50+
3851
- name: Build and push
3952
uses: docker/build-push-action@v2
4053
with:

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ RUN make dependencies
1111
# Compile
1212
COPY ./ /go/src/github.com/webdevops/kube-pool-manager
1313
RUN make test
14-
RUN make lint
1514
RUN make build
1615
RUN ./kube-pool-manager --help
1716

0 commit comments

Comments
 (0)