Skip to content

Commit 5311ff3

Browse files
committed
update github actions
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 0990534 commit 5311ff3

File tree

2 files changed

+98
-72
lines changed

2 files changed

+98
-72
lines changed

.github/workflows/release-docker.yml

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,52 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Docker meta
16-
id: docker_meta
17-
uses: crazy-max/ghaction-docker-meta@v1
18-
with:
19-
images: webdevops/azure-debug-info,quay.io/webdevops/azure-debug-info
20-
#tag-sha: true
21-
22-
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v1
24-
25-
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v1
27-
28-
- name: Login to DockerHub
29-
uses: docker/login-action@v1
30-
with:
31-
username: ${{ secrets.DOCKERHUB_USERNAME }}
32-
password: ${{ secrets.DOCKERHUB_TOKEN }}
33-
34-
- name: Login to Quay
35-
uses: docker/login-action@v1
36-
with:
37-
registry: quay.io
38-
username: ${{ secrets.QUAY_USERNAME }}
39-
password: ${{ secrets.QUAY_TOKEN }}
40-
41-
- name: Build and push
42-
uses: docker/build-push-action@v2
43-
with:
44-
context: .
45-
file: ./Dockerfile
46-
platforms: linux/amd64,linux/arm,linux/arm64,linux/ppc64le
47-
push: ${{ github.event_name != 'pull_request' }}
48-
tags: ${{ steps.docker_meta.outputs.tags }}
49-
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
60+
push: ${{ github.event_name != 'pull_request' }}
61+
tags: ${{ steps.docker_meta.outputs.tags }}
62+
labels: ${{ steps.docker_meta.outputs.labels }}

.github/workflows/scheduled-docker.yml

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,52 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Docker meta
13-
id: docker_meta
14-
uses: crazy-max/ghaction-docker-meta@v1
15-
with:
16-
images: webdevops/azure-debug-info,quay.io/webdevops/azure-debug-info
17-
#tag-sha: true
18-
19-
- name: Set up QEMU
20-
uses: docker/setup-qemu-action@v1
21-
22-
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v1
24-
25-
- name: Login to DockerHub
26-
uses: docker/login-action@v1
27-
with:
28-
username: ${{ secrets.DOCKERHUB_USERNAME }}
29-
password: ${{ secrets.DOCKERHUB_TOKEN }}
30-
31-
- name: Login to Quay
32-
uses: docker/login-action@v1
33-
with:
34-
registry: quay.io
35-
username: ${{ secrets.QUAY_USERNAME }}
36-
password: ${{ secrets.QUAY_TOKEN }}
37-
38-
- name: Build and push
39-
uses: docker/build-push-action@v2
40-
with:
41-
context: .
42-
file: ./Dockerfile
43-
platforms: linux/amd64,linux/arm,linux/arm64,linux/ppc64le
44-
push: ${{ github.event_name != 'pull_request' }}
45-
tags: ${{ steps.docker_meta.outputs.tags }}
46-
labels: ${{ steps.docker_meta.outputs.labels }}
11+
- 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+
24+
- name: Docker meta
25+
id: docker_meta
26+
uses: docker/metadata-action@v3
27+
with:
28+
images: ${{ github.repository }},quay.io/${{ github.repository }}
29+
labels: |
30+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/README.md
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v1
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v1
37+
38+
- name: Login to DockerHub
39+
uses: docker/login-action@v1
40+
with:
41+
username: ${{ secrets.DOCKERHUB_USERNAME }}
42+
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
44+
- name: Login to Quay
45+
uses: docker/login-action@v1
46+
with:
47+
registry: quay.io
48+
username: ${{ secrets.QUAY_USERNAME }}
49+
password: ${{ secrets.QUAY_TOKEN }}
50+
51+
- name: Build and push
52+
uses: docker/build-push-action@v2
53+
with:
54+
context: .
55+
file: ./Dockerfile
56+
platforms: linux/amd64,linux/arm,linux/arm64
57+
push: ${{ github.event_name != 'pull_request' }}
58+
tags: ${{ steps.docker_meta.outputs.tags }}
59+
labels: ${{ steps.docker_meta.outputs.labels }}

0 commit comments

Comments
 (0)