Skip to content

Commit

Permalink
Update .github-ci.yaml new configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleSica authored Oct 8, 2024
1 parent ade381e commit 651dfdf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/.github-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
run: |
tag="${docker_image_application}:${docker_image_version}"
echo "${{ secrets.CR_PASSWORD }}" | docker login -u "${{ secrets.CR_USERNAME }}" --password-stdin "${{ secrets.CR_REGISTRY }}"
echo "build ${{ secrets.CR_REGISTRY }}/${{ secrets.CR_REPO }}"/"${tag}"
docker build -t "${{ secrets.CR_REGISTRY }}/${{ secrets.CR_REPO }}"/"${tag}" --file Dockerfile .
# Step 7: Save Docker image as tar.gz
Expand All @@ -87,9 +86,7 @@ jobs:
tag="${docker_image_application}:${docker_image_version}"
echo "${{ secrets.CR_PASSWORD }}" | docker login -u "${{ secrets.CR_USERNAME }}" --password-stdin "${{ secrets.CR_REGISTRY }}"
trivy image --no-progress --exit-code 1 --severity HIGH,CRITICAL,UNKNOWN --format table "${{ secrets.CR_REGISTRY }}/${{ secrets.CR_REPO }}/${tag}"
exit code 1
# Step 10: Login Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v2
Expand Down Expand Up @@ -140,12 +137,6 @@ jobs:
run: |
branch_name=${GITHUB_BRANCH#refs/heads/}
echo "branch_name=${GITHUB_BRANCH#refs/heads/}" >> $GITHUB_ENV
if [[ "$branch_name" = "main" ]]
then
mType=""
else
mType="dev"
fi
echo "docker_tag=$docker_image_name:$docker_image_version" >> $GITHUB_ENV
echo "docker_tag_latest=$docker_image_name:latest" >> $GITHUB_ENV
docker_image_application=(${docker_image_name#*/})
Expand Down

0 comments on commit 651dfdf

Please sign in to comment.