Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar4all committed Jan 8, 2024
2 parents 32b54c9 + 6a7b026 commit 2ef403a
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Run Hadolint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
-
name: Scan Docker image with Trivy
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ secrets.DOCKERUSER }}/react-todo-list:${{ github.run_number }}
#exit-code-on-severity: "HIGH"
-
name: Login to Docker Hub edgar4all
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERUSER }}
password: ${{ secrets.DOCKERTOKEN }}

-
name: Build and push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}"
push: true
tags: ${{ secrets.DOCKERUSER }}/react-todo-list:${{ github.run_number }}





0 comments on commit 2ef403a

Please sign in to comment.