-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IT-3921: Rebuild container when Trivy code scan fails
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,18 @@ jobs: | |
# While GitHub repo's can be mixed (upper and lower) case, | ||
# Docker images can only be lower case | ||
IMAGE_NAME: ${{ needs.to-lower-case.outputs.lowercase-repo-name }} | ||
EXIT_CODE: 1 | ||
|
||
# If scan failed, rebuild the image | ||
update-image: | ||
needs: periodic-scan | ||
runs-on: ubuntu-latest | ||
if: ${{needs.periodic-scan.outputs.trivy_conclusion == 'failure' }} | ||
# tag the repo to trigger a new build | ||
steps: | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
... |