Removing the dnf cache and condensing this a bit

This commit is contained in:
James Jones
2023-03-04 10:45:47 -05:00
parent 976aab2b07
commit db07e74ed1

View File

@@ -89,8 +89,12 @@ jobs:
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
fi
podman build . --file Dockerfile --tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" --build-arg ARTIFACTORY=${{ matrix.registry_proxy }}
if [[ "$GITHUB_REF" =~ ^refs/pull.* ]]; then
echo "Pull requests do not get published. Only for testing"
else
podman push "${{ matrix.registry }}/$IMAGE_NAME:$VERSION"
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
podman tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" "${{ matrix.registry }}/$IMAGE_NAME:latest"
podman push "${{ matrix.registry }}/$IMAGE_NAME:latest"
fi
fi