Skip to content

Commit

Permalink
fix,ci(ct): don't grep for package updates from apt update output
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Sep 3, 2024
1 parent 54e21cc commit db64fdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/container_maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ jobs:
if: ${{ steps.temurin-check.outputs.is-more-recent == 'false' }}
run: |
PKGS="$( grep "ARG PKGS" modules/container-base/src/main/docker/Dockerfile | cut -f2 -d= | tr -d '"' )"
if [[ ! $( docker run --rm -u 0 "${BASE_IMAGE}" sh -c "apt update && apt install -s ${PKGS}" | grep -q "0 upgraded" ) ]]; then
echo "Base image $BASE_IMAGE needs package updates"
if [[ ! $( docker run --rm -u 0 "${BASE_IMAGE}" sh -c "apt update >&2 && apt install -s ${PKGS}" | grep "0 upgraded" ) ]]; then
echo "Base image $BASE_IMAGE needs updates for our custom installed packages"
echo "newer_packages=true" >> "${GITHUB_OUTPUT}"
else
echo "Base image $BASE_IMAGE has no package updates"
echo "Base image $BASE_IMAGE has no updates for our custom installed packages"
echo "newer_packages=false" >> "${GITHUB_OUTPUT}"
fi
Expand Down

0 comments on commit db64fdf

Please sign in to comment.