Skip to content

Commit 2a2898b

Browse files
committed
Added gosec
1 parent 2373020 commit 2a2898b

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

.github/workflows/action.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,21 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
20-
-
21-
name: Set up Docker Buildx
20+
- name: Set up Docker Buildx
2221
uses: docker/setup-buildx-action@v3
2322
- name: Login to DockerHub
2423
uses: docker/login-action@v3
2524
with:
2625
username: ${{ secrets.DOCKERHUB_USERNAME }}
2726
password: ${{ secrets.DOCKERHUB_TOKEN }}
28-
-
29-
name: Cache Docker layers
27+
- name: Cache Docker layers
3028
uses: actions/cache@v4
3129
with:
3230
path: /tmp/.buildx-cache
3331
key: ${{ runner.os }}-buildx-${{ github.sha }}
3432
restore-keys: |
3533
${{ runner.os }}-buildx-
36-
-
37-
name: Build a dev image
34+
- name: Build a dev image
3835
id: docker_build_dev
3936
uses: docker/build-push-action@v5
4037
with:
@@ -45,32 +42,25 @@ jobs:
4542
tags: transformimgs-dev
4643
cache-from: type=local,src=/tmp/.buildx-cache
4744
cache-to: type=local,dest=/tmp/.buildx-cache
48-
-
49-
name: Gosec
45+
- name: Gosec
5046
id: gosec
5147
uses: securego/gosec@master
5248
with:
53-
args:
54-
- -exclude-dir illustration
55-
- ./...
56-
-
57-
name: Gosec illustration
49+
args: -exclude-dir illustration ./...
50+
- name: Gosec illustration
5851
id: gosecillustration
5952
working-directory: ./illustration
6053
uses: securego/gosec@master
6154
with:
62-
args:
63-
- ./...
64-
-
65-
name: Run tests
55+
args: ./...
56+
- name: Run tests
6657
run: |
6758
docker run --entrypoint=/go/src/github.com/Pixboost/transformimgs/test.sh -v $(pwd):/go/src/github.com/Pixboost/transformimgs transformimgs-dev
6859
- id: codecov
6960
uses: codecov/codecov-action@v5
7061
with:
7162
token: ${{ secrets.CODECOV_TOKEN }}
72-
-
73-
name: Build a prod image
63+
- name: Build a prod image
7464
id: docker_build_prod
7565
uses: docker/build-push-action@v5
7666
with:
@@ -83,17 +73,14 @@ jobs:
8373
"BRANCH=${{ github.ref_name }}"
8474
cache-from: type=local,src=/tmp/.buildx-cache
8575
cache-to: type=local,dest=/tmp/.buildx-cache
86-
-
87-
name: Run the service
76+
- name: Run the service
8877
run: |
8978
docker run -p 8080:8080 -d transformimgs
9079
sleep 5
91-
-
92-
name: Smoketest
80+
- name: Smoketest
9381
run: |
9482
curl -o /dev/null -f http://localhost:8080/img/https://pixboost.com/img/homepage/hero.jpg/resize?size=x600
95-
-
96-
name: Publish image
83+
- name: Publish image
9784
if: ${{ github.event_name == 'release' }}
9885
uses: docker/build-push-action@v5
9986
with:

0 commit comments

Comments
 (0)