diff --git a/.github/workflows/03-build-containers.yml b/.github/workflows/03-build-containers.yml index 731adf9..25fd73e 100644 --- a/.github/workflows/03-build-containers.yml +++ b/.github/workflows/03-build-containers.yml @@ -3,7 +3,7 @@ name: "Nível 3: Containers e Segurança" on: pull_request: types: [closed] - branches: [desafio-nivel-3] + branches: [ desafio-nivel-3 ] permissions: contents: read @@ -12,7 +12,7 @@ permissions: env: CHALLENGE_LEVEL: 3 CHALLENGE_NAME: "containers-e-seguranca" - REGISTRY: ghcr.iodesafio-nivel-3 + REGISTRY: ghcr.io jobs: build-scan-and-push: @@ -21,8 +21,6 @@ jobs: runs-on: ubuntu-latest steps: - # AQUI VAI O CÓDIGO DO DESAFIO :) - - name: Checkout repository uses: actions/checkout@v3 @@ -39,6 +37,7 @@ jobs: if grep -qE "DL3006|DL3008" lint-report.txt; then echo "Linting failed due to DL3006 or DL3008." && exit 1; fi + - name: Upload lint report uses: actions/upload-artifact@v3 with: @@ -59,13 +58,14 @@ jobs: context: . file: ./Dockerfile push: false - tags: ghcr.io/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }} + tags: ghcr.io/${{ github.repository_owner }}/my-app:${{ github.sha }} - name: Scan Docker image for vulnerabilities with Trivy id: scan-image uses: aquasecurity/trivy-action@0.28.0 with: - image-ref: ghcr.io/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }} + image-ref: ghcr.io/${{ github.repository_owner }}/my-app:${{ github.sha }} + format: table output: trivy-report.txt @@ -126,4 +126,4 @@ jobs: with: name: level-3-certificate path: certificates/ - retention-days: 30 + retention-days: 30 \ No newline at end of file