Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rouja committed Sep 26, 2024
1 parent 6e5cbfc commit 4baea2d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ jobs:
name: Build an image from Dockerfile
run: |
docker build --target backend-production -t docker.io/lasuite/meet-backend:${{ github.sha }} .
-
name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
-
uses: actions/cache@v4
with:
path: /tmp/trivy
key: ${{ steps.get-date.outputs.date }}
-
name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
Expand All @@ -63,6 +74,7 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
cache-dir: /tmp/trivy
-
name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -73,6 +85,12 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
uses: actions/cache/save@v3
if: always()
with:
path: /tmp/trivy
key: ${{ steps.get-date.outputs.date }}

build-and-push-frontend:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -111,6 +129,17 @@ jobs:
name: Build an image from Dockerfile
run: |
docker build -f src/frontend/Dockerfile -t docker.io/lasuite/meet-frontend:${{ github.sha }} .
-
name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
-
uses: actions/cache@v4
with:
path: trivy
key: ${{ steps.get-date.outputs.date }}
-
name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
Expand All @@ -121,6 +150,14 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
cache-dir: trivy
-
name: Debug
if: always()
run: |
whoami;
sudo chown -R 1001:127 trivy
shell: bash
-
name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -132,6 +169,12 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
uses: actions/cache/save@v3
if: always()
with:
path: trivy
key: ${{ steps.get-date.outputs.date }}

notify-argocd:
needs:
Expand Down

0 comments on commit 4baea2d

Please sign in to comment.