|
37 | 37 | VERSION: ${{ github.event.inputs.version }} |
38 | 38 | REPOSITORY: ${{ matrix.repository }} |
39 | 39 | run: | |
40 | | - cd $REPOSITORY |
| 40 | + curl -L https://github.com/cli/cli/releases/download/v2.27.0/gh_2.27.0_linux_amd64.tar.gz -o ghcli.tar.gz |
| 41 | + tar --strip-components=1 -xf ghcli.tar.gz -C /usr/local |
| 42 | + |
| 43 | + cd $REPOSITORY |
| 44 | + |
| 45 | + # Sync fork |
| 46 | + gh auth setup-git |
| 47 | + gh repo set-default $REPOSITORY |
| 48 | + gh repo sync -b main |
| 49 | + |
41 | 50 | mkdir -p "${REPO_PATH}/${VERSION}" |
42 | 51 |
|
43 | 52 | cd ../../mongodb-atlas-kubernetes |
@@ -69,26 +78,26 @@ jobs: |
69 | 78 | REPOSITORY: ${{ matrix.repository }} |
70 | 79 | IMAGE: quay.io/mongodb/mongodb-atlas-kubernetes-operator |
71 | 80 | run: | |
| 81 | + curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq && chmod +x /usr/local/bin/yq |
| 82 | + |
72 | 83 | # Reference to image |
73 | | - REPO_DIGEST=$(docker inspect --format='{{ index .RepoDigests 0}}' "${IMAGE}":"${VERSION}") |
74 | | - containerImage="quay.io/${REPO_DIGEST}" |
75 | | - yq e -i '.metadata.annotations.containerImage = env(containerImage)' "${VERSION}"/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml |
76 | | - yq e -i '.spec.install.spec.deployments[0].spec.template.spec.containers[0].image = env(containerImage)' "${VERSION}"/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml |
| 84 | + docker pull "${IMAGE}":"${VERSION}" |
| 85 | + export REPO_DIGEST=$(docker inspect --format='{{ index .RepoDigests 0}}' "${IMAGE}":"${VERSION}") |
| 86 | + |
| 87 | + cd "$REPOSITORY/$REPO_PATH" |
| 88 | + yq e -i '.metadata.annotations.containerImage = env(REPO_DIGEST)' "${VERSION}"/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml |
| 89 | + yq e -i '.spec.install.spec.deployments[0].spec.template.spec.containers[0].image = env(REPO_DIGEST)' "${VERSION}"/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml |
77 | 90 |
|
78 | 91 | # Add skip range |
79 | 92 | value='">=0.8.0"' yq e -i '.spec.skipRange = env(value)' "${VERSION}"/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml |
80 | 93 | - name: Push Changes & Open PR |
81 | 94 | env: |
82 | 95 | VERSION: ${{ github.event.inputs.version }} |
83 | 96 | REPOSITORY: ${{ matrix.repository }} |
84 | | - ASSIGNEES: priyolahiri,fabritsius,igor-karpukhin,sugar-pack,helderjs |
| 97 | + ASSIGNEES: igor-karpukhin,helderjs |
85 | 98 | run: | |
86 | 99 | cd "$REPOSITORY/$REPO_PATH" |
87 | 100 | |
88 | | - # Sync fork |
89 | | - gh auth setup-git |
90 | | - gh repo sync -b main |
91 | | - |
92 | 101 | # configure git user |
93 | 102 | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
94 | 103 | git config --global user.name "github-actions[bot]" |
|
0 commit comments