Skip to content

Commit 4a31d49

Browse files
committed
Update release.yml
1 parent 5d05116 commit 4a31d49

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

.github/workflows/release.yml

+27-24
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,32 @@ jobs:
3434
- name: Run mypy
3535
run: uv run mypy .
3636

37+
security:
38+
runs-on: ubuntu-24.04
39+
timeout-minutes: 10
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Run Trivy vulnerability scanner
44+
uses: aquasecurity/trivy-action@master
45+
with:
46+
scan-type: "fs"
47+
scan-ref: "."
48+
format: "table"
49+
exit-code: "1"
50+
severity: "CRITICAL"
51+
skip-dirs: "tests"
52+
53+
- name: Check dependencies for vulnerabilities
54+
uses: aquasecurity/trivy-action@master
55+
with:
56+
scan-type: "config"
57+
scan-ref: "."
58+
format: "table"
59+
exit-code: "1"
60+
severity: "CRITICAL"
61+
vuln-type: "library"
62+
3763
test:
3864
runs-on: ubuntu-24.04
3965
timeout-minutes: 15
@@ -61,6 +87,7 @@ jobs:
6187
runs-on: ubuntu-24.04
6288
needs:
6389
- check
90+
- security
6491
- test
6592
concurrency: release
6693

@@ -81,7 +108,6 @@ jobs:
81108
docker:
82109
runs-on: ubuntu-24.04
83110
needs: release
84-
# if: needs.release.outputs.released == 'true'
85111
steps:
86112
- uses: actions/checkout@v4
87113

@@ -90,26 +116,3 @@ jobs:
90116
with:
91117
username: ${{ secrets.DOCKER_USERNAME }}
92118
password: ${{ secrets.DOCKER_PASSWORD }}
93-
94-
- name: Build and scan image
95-
uses: docker/build-push-action@v6
96-
with:
97-
push: false
98-
load: true
99-
tags: antonk0/gigachat-adapter:${{ needs.release.outputs.version }}
100-
101-
- name: Run Trivy vulnerability scanner
102-
uses: aquasecurity/trivy-action@master
103-
with:
104-
image-ref: antonk0/gigachat-adapter:${{ needs.release.outputs.version }}
105-
format: "table"
106-
exit-code: "1"
107-
severity: "CRITICAL"
108-
109-
# - name: Build and Push Docker image
110-
# uses: docker/build-push-action@v6
111-
# with:
112-
# push: true
113-
# tags: |
114-
# antonk0/gigachat-adapter:latest
115-
# antonk0/gigachat-adapter:${{ needs.release.outputs.version }}

0 commit comments

Comments
 (0)