File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 8787 registry : ${{ env.imageregistry }}/${{ env.imagenamespace }}
8888 username : ${{ secrets.QUAY_USERNAME }}
8989 password : ${{ secrets.QUAY_PASSWORD }}
90+ digestfile : digest.txt
91+
92+ # tag the quay.io image with the digest so it is preserved
93+ - name : Set OPERATOR_INDEX_IMAGE_DIGEST for Operator and tag
94+ shell : bash
95+ run : |
96+ DIGEST=$(cat digest.txt | sed -e 's|sha256:||')
97+ echo "OPERATOR_INDEX_IMAGE_DIGEST=$DIGEST" >> $GITHUB_ENV
98+ podman tag "${REGISTRY}/${IMAGE}:${GITHUB_SHA}" "${REGISTRY}/${IMAGE}:${DIGEST}"
99+ env :
100+ REGISTRY : ${{ env.imageregistry }}/${{ env.imagenamespace }}
101+ IMAGE : openstack-operator-index-upgrade
102+ GITHUB_SHA : ${{ github.sha }}
103+
104+ - name : Push tag with digest ${{ env.OPERATOR_INDEX_IMAGE_DIGEST }}
105+ uses : redhat-actions/push-to-registry@v2
106+ with :
107+ image : openstack-operator-index-upgrade
108+ tags : ${{ env.OPERATOR_INDEX_IMAGE_DIGEST }}
109+ registry : ${{ env.imageregistry }}/${{ env.imagenamespace }}
110+ username : ${{ secrets.QUAY_USERNAME }}
111+ password : ${{ secrets.QUAY_PASSWORD }}
Original file line number Diff line number Diff line change 22# NOTE: this script is used by the catalog-openstack-operator-upgrades.yaml
33set -ex
44
5+ function toDigestURL {
6+ local URL=$1
7+
8+ DIGEST=$( skopeo inspect --format ' {{.Digest}}' docker://$URL )
9+ echo $URL | sed -e " s|:.*|@$DIGEST |"
10+
11+ }
12+
513MAIN_VERSION=${MAIN_VERSION:- " 0.4.0" }
614FEATURE_RELEASE_VERSION=${FEATURE_RELEASE_VERSION:- " 0.3.0" }
715FEATURE_RELEASE_BRANCH=${FEATURE_RELEASE_BRANCH:- " 18.0-fr3" }
@@ -14,9 +22,10 @@ mkdir catalog
1422opm generate dockerfile ./catalog -i registry.redhat.io/openshift4/ose-operator-registry-rhel9:v4.18
1523opm init openstack-operator --default-channel=stable-v1.0 --output yaml > catalog/index.yaml
1624
17- opm render ${BUNDLE} --output yaml >> catalog/index.yaml
25+ # opm render ${BUNDLE} --output yaml >> catalog/index.yaml
26+ opm render $( toDigestURL $BUNDLE ) --output yaml >> catalog/index.yaml
1827# always default to use the FR release from openstack-k8s-operators
19- opm render quay.io/openstack-k8s-operators/openstack-operator-bundle:${FEATURE_RELEASE_BRANCH} -latest --output yaml >> catalog/index.yaml
28+ opm render $( toDigestURL quay.io/openstack-k8s-operators/openstack-operator-bundle:${FEATURE_RELEASE_BRANCH} -latest) --output yaml >> catalog/index.yaml
2029
2130 cat >> catalog/index.yaml << EOF_CAT
2231---
You can’t perform that action at this time.
0 commit comments