Skip to content

Commit 720525a

Browse files
[CI] Deploy CI
1 parent a1b95c3 commit 720525a

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/push_build_dev.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
workflow_dispatch:
1212

1313
env:
14-
SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}}
14+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1515

1616
jobs:
1717
versioning:
@@ -27,7 +27,7 @@ jobs:
2727
- name: set version with current date
2828
id: versioning
2929
run: |
30-
echo "::set-output name=VERSION::$(cat src/VERSION | cut -c 2-).${{ env.TIME }}"
30+
echo "VERSION=$(cat src/VERSION | cut -c 2-).${{ env.TIME }}" >> $GITHUB_OUTPUT
3131
- name: Notice when job fails
3232
if: failure()
3333
uses: 8398a7/action-slack@v3.2.0
@@ -64,8 +64,10 @@ jobs:
6464
author_name: Github Action Slack
6565

6666
scan:
67-
needs: docker
67+
needs: [versioning, docker]
6868
runs-on: ubuntu-20.04
69+
env:
70+
VERSION: ${{ needs.versioning.outputs.version }}
6971
steps:
7072
- name: Run Trivy vulnerability scanner
7173
id: trivy-scan
@@ -77,7 +79,7 @@ jobs:
7779
ignore-unfixed: true
7880
vuln-type: 'os,library'
7981
severity: 'CRITICAL,HIGH'
80-
82+
8183
- name: Upload Trivy scan results to GitHub Security tab
8284
uses: github/codeql-action/upload-sarif@v2
8385
with:
@@ -111,7 +113,7 @@ jobs:
111113
"fields": [
112114
{
113115
"type": "mrkdwn",
114-
"text": "*Image:*\n$pyengine/${{ github.event.repository.name }}:${{ env.VERSION }}"
116+
"text": "*Image:*\npyengine/${{ github.event.repository.name }}:${{ env.VERSION }}"
115117
},
116118
{
117119
"type": "mrkdwn",
@@ -137,7 +139,7 @@ jobs:
137139
]
138140
}
139141
env:
140-
SLACK_WEBHOOK_URL: ${{secrets.VULNERABILITY_SLACK_WEBHOOK_URL}}
142+
SLACK_WEBHOOK_URL: ${{secrets.VULNERABILITY_SLACK_WEBHOOK_URL}}
141143

142144
notification:
143145
runs-on: ubuntu-latest
@@ -149,4 +151,4 @@ jobs:
149151
with:
150152
status: ${{job.status}}
151153
fields: repo,message,commit,author,action,ref,workflow,job
152-
author_name: Github Action Slack
154+
author_name: Github Action Slack

0 commit comments

Comments
 (0)