-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from sarg3nt/Updates-found-while-updating-cert…
…-manager-infoblox Updates learned from cert-manager-webhook repo
- Loading branch information
Showing
10 changed files
with
209 additions
and
73 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
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
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 |
---|---|---|
|
@@ -137,6 +137,8 @@ | |
"roslynator", | ||
"RPCs", | ||
"rref", | ||
"sarg", | ||
"sarg3nt", | ||
"sbnumber", | ||
"semver", | ||
"Serilog", | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
#cspell:ignore diffoci | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
main() { | ||
if [ -z "${TAG_OLD:-}" ]; then | ||
echo "Error: TAG_OLD is not set." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${TAG_PATCH:-}" ]; then | ||
echo "Error: TAG_PATCH is not set." | ||
exit 1 | ||
fi | ||
|
||
echo "Downloading the diffoci binary." | ||
latest_release_url=$(gh release view -R reproducible-containers/diffoci --json assets -q '.assets[] | select(.name | test("linux-amd64")) | .url') | ||
echo "Using the latest release URL: $latest_release_url" | ||
curl -L -o diffoci "$latest_release_url" | ||
chmod +x diffoci | ||
# Github runner does not print empty echos. :( | ||
echo "-" | ||
|
||
echo "Pulling the previous Docker image to compare." | ||
docker pull "${TAG_OLD}" | ||
echo "-" | ||
|
||
echo "Checking if the images are different with diffoci." | ||
OLD_IMAGE="docker://${TAG_OLD}" | ||
NEW_IMAGE="docker://${TAG_PATCH}" | ||
set +e | ||
./diffoci diff --semantic "$OLD_IMAGE" "$NEW_IMAGE" | ||
DIFFOCI_EXIT_CODE=$? | ||
set -e | ||
echo "-" | ||
|
||
# Check the exit code of diffoci. If it is zero then there are no changes, otherwise there are. | ||
if [ $DIFFOCI_EXIT_CODE -eq 0 ]; then | ||
echo "The images appear to be the same, exiting." | ||
echo "continue=false" >>"$GITHUB_OUTPUT" | ||
exit 0 | ||
fi | ||
|
||
echo "The images appear to be different. Continuing." | ||
echo "continue=true" >>"$GITHUB_OUTPUT" | ||
} | ||
|
||
if ! (return 0 2>/dev/null); then | ||
(main "$@") | ||
fi |
Oops, something went wrong.