Skip to content

Commit

Permalink
chore: update image name
Browse files Browse the repository at this point in the history
  • Loading branch information
SannyNguyenHung committed Nov 3, 2023
1 parent 7ea5904 commit b30dd20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/testing-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ github.repository }}-test

jobs:
test-app:
Expand Down Expand Up @@ -47,12 +47,12 @@ jobs:

- name: Build an image from Dockerfile
run: |
docker build -t ${{ env.IMAGE_NAME }}-test:${{ github.sha }} .
docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ env.IMAGE_NAME }}-test:${{ github.sha }}"
image-ref: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
Expand All @@ -74,8 +74,8 @@ jobs:

- name: Push image
run: |
docker tag ${{ env.IMAGE_NAME }}-test:${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
docker tag ${{ env.IMAGE_NAME }}-test:${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-test:${{ github.sha }}
docker tag ${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
docker tag ${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
docker push --all-tags ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
deploy:
Expand Down

0 comments on commit b30dd20

Please sign in to comment.