Skip to content

Commit

Permalink
[AWSRESET-313]: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-dvsa committed Oct 8, 2023
1 parent cbaecda commit e1d838d
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/php-base-image-build-pr-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ jobs:
- uses: actions/checkout@v3

- name: Lint check on dockerfile
run: docker run --rm --privileged -v `pwd`:/root/ projectatomic/dockerfile-lint dockerfile_lint -f build/vol-php-fpm//dockerfile
run: |
jq -c '.[]' build.json | while read -r results; do
build=$(echo "$results" | jq -r '.build')
repoName=$(echo "$results" | jq -r '.repoName')
dockerFile=$(echo "$results" | jq -r '.dockerFile')
if [ "$build" == "true" ]; then
docker run --rm --privileged -v `pwd`:/root/ projectatomic/dockerfile-lint dockerfile_lint -f build/$repoName/$dockerfile
else
echo "Not linting - $repoName, build parameter equal to false"
fi
done
- name: Set IMAGE_TAG
run: |
Expand Down Expand Up @@ -54,15 +65,16 @@ jobs:
bash scripts/docker-build.sh
#docker build -t ${{ secrets.ECR_BASE_URL }}:$IMAGE_TAG -f dockerfile .
- name: Docker image list
run: |
image_list=$(docker images --format "{{.Repository}}")
- name: Snyk scan api image
id: scan-api-image
run: |
image_list=$(docker images --format "{{.Repository}}")
for image in $image_list; do
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: $image
done
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image:


0 comments on commit e1d838d

Please sign in to comment.