Removing the dnf cache and condensing this a bit
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -89,8 +89,12 @@ jobs:
|
|||||||
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
VERSION=$(echo "${GITHUB_REF_NAME}" | sed 's|/|-|g')
|
||||||
fi
|
fi
|
||||||
podman build . --file Dockerfile --tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" --build-arg ARTIFACTORY=${{ matrix.registry_proxy }}
|
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"
|
podman push "${{ matrix.registry }}/$IMAGE_NAME:$VERSION"
|
||||||
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
if [[ "$GITHUB_REF" =~ ^refs/tags.* ]]; then
|
||||||
podman tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
podman tag "${{ matrix.registry }}/$IMAGE_NAME:$VERSION" "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
||||||
podman push "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
podman push "${{ matrix.registry }}/$IMAGE_NAME:latest"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user