-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,37 +50,15 @@ jobs: | |
if: github.event_name != 'pull_request' | ||
run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin | ||
- | ||
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 | ||
name: Run trivy scan | ||
uses: numerique-gouv/action-trivy-cache@main | ||
with: | ||
path: trivy | ||
key: ${{ steps.get-date.outputs.date }} | ||
docker-build-args: '--target backend-production -f Dockerfile' | ||
docker-image-name: 'docker.io/lasuite/meet-backend:${{ github.sha }}' | ||
- | ||
name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/lasuite/meet-backend:${{ github.sha }}' | ||
format: 'table' | ||
exit-code: '1' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
cache-dir: trivy | ||
- | ||
name: Fix trivy cache folder permission | ||
if: always() | ||
name: Build an image from Dockerfile | ||
run: | | ||
sudo chown -R 1001:127 trivy | ||
shell: bash | ||
docker build --target backend-production -t docker.io/lasuite/meet-backend:${{ github.sha }} . | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
|
@@ -91,12 +69,6 @@ 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 }} | ||
|
||
build-and-push-frontend: | ||
runs-on: ubuntu-latest | ||
|
@@ -132,37 +104,11 @@ jobs: | |
if: github.event_name != 'pull_request' | ||
run: echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USER" --password-stdin | ||
- | ||
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 | ||
name: Run trivy scan | ||
uses: numerique-gouv/action-trivy-cache@main | ||
with: | ||
path: trivy | ||
key: ${{ steps.get-date.outputs.date }} | ||
- | ||
name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/lasuite/meet-frontend:${{ github.sha }}' | ||
format: 'table' | ||
exit-code: '1' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
cache-dir: trivy | ||
- | ||
name: Fix trivy cache folder permission | ||
if: always() | ||
run: | | ||
sudo chown -R 1001:127 trivy | ||
shell: bash | ||
docker-build-args: '-f src/frontend/Dockerfile' | ||
docker-image-name: 'docker.io/lasuite/meet-frontend:${{ github.sha }}' | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
|
@@ -174,12 +120,6 @@ 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: | ||
|