11name : " Release: docker"
22
33on :
4- schedule :
5- - cron : ' 0 6 * * 1'
64 push :
75 branches :
86 - ' **'
@@ -13,39 +11,52 @@ jobs:
1311 build :
1412 runs-on : ubuntu-latest
1513 steps :
16- - uses : actions/checkout@v2
17- - name : Docker meta
18- id : docker_meta
19- uses : crazy-max/ghaction-docker-meta@v1
20- with :
21- images : webdevops/kube-bootstrap-token-manager,quay.io/webdevops/kube-bootstrap-token-manager
22- # tag-sha: true
23-
24- - name : Set up QEMU
25- uses : docker/setup-qemu-action@v1
26-
27- - name : Set up Docker Buildx
28- uses : docker/setup-buildx-action@v1
29-
30- - name : Login to DockerHub
31- uses : docker/login-action@v1
32- with :
33- username : ${{ secrets.DOCKERHUB_USERNAME }}
34- password : ${{ secrets.DOCKERHUB_TOKEN }}
35-
36- - name : Login to Quay
37- uses : docker/login-action@v1
38- with :
39- registry : quay.io
40- username : ${{ secrets.QUAY_USERNAME }}
41- password : ${{ secrets.QUAY_TOKEN }}
42-
43- - name : Build and push
44- uses : docker/build-push-action@v2
45- with :
46- context : .
47- file : ./Dockerfile
48- platforms : linux/amd64,linux/arm,linux/arm64,linux/ppc64le
49- push : ${{ github.event_name != 'pull_request' }}
50- tags : ${{ steps.docker_meta.outputs.tags }}
51- labels : ${{ steps.docker_meta.outputs.labels }}
14+ - 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+
27+ - name : Docker meta
28+ id : docker_meta
29+ uses : docker/metadata-action@v3
30+ with :
31+ images : ${{ github.repository }},quay.io/${{ github.repository }}
32+ labels : |
33+ io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/README.md
34+
35+ - name : Set up QEMU
36+ uses : docker/setup-qemu-action@v1
37+
38+ - name : Set up Docker Buildx
39+ uses : docker/setup-buildx-action@v1
40+
41+ - name : Login to DockerHub
42+ uses : docker/login-action@v1
43+ with :
44+ username : ${{ secrets.DOCKERHUB_USERNAME }}
45+ password : ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+ - name : Login to Quay
48+ uses : docker/login-action@v1
49+ with :
50+ registry : quay.io
51+ username : ${{ secrets.QUAY_USERNAME }}
52+ password : ${{ secrets.QUAY_TOKEN }}
53+
54+ - name : Build and push
55+ uses : docker/build-push-action@v2
56+ with :
57+ context : .
58+ file : ./Dockerfile
59+ platforms : linux/amd64,linux/arm,linux/arm64,linux/ppc64le
60+ push : ${{ github.event_name != 'pull_request' }}
61+ tags : ${{ steps.docker_meta.outputs.tags }}
62+ labels : ${{ steps.docker_meta.outputs.labels }}
0 commit comments