From dad603f8c35d3b2609e5cbd160651f52fb6d830c Mon Sep 17 00:00:00 2001 From: Yoofi-A-Appiah Date: Tue, 11 Jun 2024 19:29:33 +0000 Subject: [PATCH] ci: using [] in os environ 3 --- .github/workflows/trivy-scan.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index ca42d2b..12aa861 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -9,6 +9,8 @@ permissions: id-token: write contents: read +env: + GIT_SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} jobs: scan: name: AWS Scan @@ -24,7 +26,9 @@ jobs: uses: actions/checkout@v3 - name: Set up date environment variable - run: echo "TIMESTAMP=$(date +%Y%m%d)" >> $GITHUB_ENV + run: | + echo "TIMESTAMP=$(date +%Y%m%d)" >> $GITHUB_ENV + echo "SLACK_TOKEN=${GIT_SLACK_TOKEN}" >> $GITHUB_ENV - name: Install Trivy run: | @@ -56,7 +60,8 @@ jobs: - name: Slack Notification run: | pip3 install slack_sdk - echo "SLACK_TOKEN=${{ secrets.SLACK_TOKEN }}" >> $GITHUB_ENV + + echo "TIMESTAMP=$(date +%Y%m%d)" >> $GITHUB_ENV python3 ${{ github.workspace }}/slackmessenger.py - name: Cleanup