Skip to content

Commit c7ade8a

Browse files
authored
Merge pull request #67 from essentialkaos/develop
Improve GitHub Actions CI workflow
2 parents f8349e7 + c8f3e60 commit c7ade8a

3 files changed

Lines changed: 72 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
go: [ '1.15.x', '1.16.x' ]
22+
go: [ '1.16.x', '1.17.x' ]
2323

2424
steps:
2525
- name: Set up Go
@@ -47,6 +47,52 @@ jobs:
4747
working-directory: ${{env.SRC_DIR}}
4848
run: make all
4949

50+
Aligo:
51+
name: Aligo
52+
runs-on: ubuntu-latest
53+
54+
needs: Go
55+
56+
env:
57+
SRC_DIR: src/github.com/${{ github.repository }}
58+
GO111MODULE: auto
59+
60+
steps:
61+
- name: Set up Go
62+
uses: actions/setup-go@v2
63+
with:
64+
go-version: '1.16.x'
65+
id: go
66+
67+
- name: Setup PATH
68+
run: |
69+
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
70+
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
71+
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
72+
73+
- name: Checkout
74+
uses: actions/checkout@v2
75+
with:
76+
path: ${{env.SRC_DIR}}
77+
78+
- name: Download dependencies
79+
working-directory: ${{env.SRC_DIR}}
80+
run: make deps
81+
82+
- name: Install Aligo
83+
working-directory: ${{env.SRC_DIR}}
84+
run: |
85+
wget https://apps.kaos.st/aligo/latest/linux/x86_64/aligo
86+
chmod +x aligo
87+
88+
- name: Print Aligo version info
89+
working-directory: ${{env.SRC_DIR}}
90+
run: ./aligo --version
91+
92+
- name: Check Go structs alignment info
93+
working-directory: ${{env.SRC_DIR}}
94+
run: ./aligo check ./...
95+
5096
Perfecto:
5197
name: Perfecto
5298
runs-on: ubuntu-latest
@@ -85,7 +131,7 @@ jobs:
85131
needs: Go
86132

87133
env:
88-
HADOLINT_VERSION: 2.1.0
134+
HADOLINT_VERSION: 2.6.1
89135

90136
steps:
91137
- name: Checkout
@@ -101,3 +147,23 @@ jobs:
101147

102148
- name: Check Docker files
103149
run: ./hadolint Dockerfile
150+
151+
DockerBuild:
152+
name: Docker Build Check
153+
runs-on: ubuntu-latest
154+
155+
needs: Hadolint
156+
157+
steps:
158+
- name: Checkout
159+
uses: actions/checkout@v2
160+
161+
- name: Login to DockerHub
162+
uses: docker/login-action@v1
163+
with:
164+
username: ${{ secrets.DOCKERHUB_USERNAME }}
165+
password: ${{ secrets.DOCKERHUB_TOKEN }}
166+
167+
- name: Build CentOS 7 image
168+
run: |
169+
docker build -f Dockerfile -t centos7 .

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ COPY . .
88

99
ENV GO111MODULE=auto
1010

11-
RUN apk add --no-cache git=~2.30 make=4.3-r0 upx=3.96-r1 && \
11+
RUN apk add --no-cache git=~2.32 make=4.3-r0 upx=3.96-r1 && \
1212
make deps && \
1313
make all && \
1414
upx sslcli
1515

1616
## FINAL IMAGE #################################################################
1717

18-
FROM alpine:3.13
18+
FROM essentialkaos/alpine:3.13
1919

2020
LABEL name="SSLCLI Image" \
2121
vendor="ESSENTIAL KAOS" \
2222
maintainer="Anton Novojilov" \
2323
license="EKOL" \
24-
version="2021.05.01"
24+
version="2021.08.21"
2525

2626
COPY --from=builder /go/src/github.com/essentialkaos/sslcli/sslcli /usr/bin/
2727

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#### From source
2626

27-
To build the SSLScan Client from scratch, make sure you have a working Go 1.14+ workspace ([instructions](https://golang.org/doc/install)), then:
27+
To build the SSLScan Client from scratch, make sure you have a working Go 1.16+ workspace ([instructions](https://golang.org/doc/install)), then:
2828

2929
```
3030
go get github.com/essentialkaos/sslcli

0 commit comments

Comments
 (0)