-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add proper kernel version to ostree.linux label
- Loading branch information
Showing
3 changed files
with
28 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,8 @@ jobs: | |
echo "SOURCE_IMAGE=base" >> $GITHUB_ENV | ||
echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV | ||
fi | ||
echo "FQ_SOURCE_IMAGE=quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }}" >> $GITHUB_ENV | ||
- name: Generate tags | ||
id: generate-tags | ||
|
@@ -120,27 +122,35 @@ jobs: | |
# DEBUG: get character count of key | ||
wc -c certs/private_key.priv | ||
- name: Get current version | ||
id: labels | ||
- name: Pull build image | ||
uses: Wandalen/[email protected] | ||
with: | ||
attempt_limit: 3 | ||
attempt_delay: 15000 | ||
command: | | ||
set -eo pipefail | ||
skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} > inspect.json | ||
ver=$(jq -r '.Labels["org.opencontainers.image.version"]' inspect.json) | ||
linux=$(jq -r '.Labels["ostree.linux"]' inspect.json) | ||
if [ -z "$ver" ] || [ "null" = "$ver" ]; then | ||
echo "inspected image version must not be empty or null" | ||
exit 1 | ||
fi | ||
if [ -z "$linux" ] || [ "null" = "$linux" ]; then | ||
echo "inspected image linux version must not be empty or null" | ||
exit 1 | ||
fi | ||
echo "SOURCE_IMAGE_VERSION=$ver" >> $GITHUB_ENV | ||
echo "SOURCE_IMAGE_LINUX=$linux" >> $GITHUB_ENV | ||
# pull the base image used for FROM in containerfile so | ||
# we can retry on that unfortunately common failure case | ||
podman pull ${{ env.FQ_SOURCE_IMAGE }} | ||
- name: Get current version | ||
id: labels | ||
uses: docker://${{ FQ_SOURCE_IMAGE }} | ||
shell: bash | ||
run: | | ||
set -eo pipefail | ||
skopeo inspect docker://${{ env.FQ_SOURCE_IMAGE }} > inspect.json | ||
ver=$(jq -r '.Labels["org.opencontainers.image.version"]' inspect.json) | ||
linux=$(jq -r '.Labels["ostree.linux"]' inspect.json) | ||
if [ -z "$ver" ] || [ "null" = "$ver" ]; then | ||
echo "inspected image version must not be empty or null" | ||
exit 1 | ||
fi | ||
if [ -z "$linux" ] || [ "null" = "$linux" ]; then | ||
echo "inspected image linux version must not be empty or null" | ||
exit 1 | ||
fi | ||
echo "SOURCE_IMAGE_VERSION=$ver" >> $GITHUB_ENV | ||
echo "SOURCE_IMAGE_LINUX=$linux" >> $GITHUB_ENV | ||
# Build metadata | ||
- name: Image Metadata | ||
|
@@ -157,16 +167,6 @@ jobs: | |
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md | ||
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/1728152?s=200&v=4 | ||
- name: Pull build image | ||
uses: Wandalen/[email protected] | ||
with: | ||
attempt_limit: 3 | ||
attempt_delay: 15000 | ||
command: | | ||
# pull the base image used for FROM in containerfile so | ||
# we can retry on that unfortunately common failure case | ||
podman pull quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} | ||
# Build image using Buildah action | ||
- name: Build Image | ||
id: build_image | ||
|