Skip to content

Commit 0970821

Browse files
ci: fix a bug where the folder name had a extra v prefix in the version (#75)
Signed-off-by: Harikrishnan Balagopal <[email protected]>
1 parent 6554a75 commit 0970821

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/raise-pr.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- name: cleanup
3030
run: rm -rf {*,.*} || true
3131
- name: checkout-the-move2kube-fork-of-upstream-repo
32+
shell: bash
3233
run: |
3334
git clone 'https://move2kube:${{ secrets.MOVE2KUBE_PATOKEN }}@github.com/move2kube/community-operators'
3435
cd community-operators/ || exit 1
@@ -37,7 +38,29 @@ jobs:
3738
git config user.email [email protected]
3839
echo 'copy-bundle-into-fork-creating-new-version-dir'
3940
cd operators/move2kube-operator/ || exit 1
40-
cp -r /tmp/bundle-operator-move2kube '${{ github.event.inputs.tag }}' && cp /tmp/bundle.Dockerfile '${{ github.event.inputs.tag }}/bundle.Dockerfile'
41+
VERSION='${{ github.event.inputs.tag }}'
42+
VERSION_WITHOUT_V="${VERSION#v}"
43+
cp -r /tmp/bundle-operator-move2kube "${VERSION_WITHOUT_V}" && cp /tmp/bundle.Dockerfile "${VERSION_WITHOUT_V}"/bundle.Dockerfile
44+
echo 'make a commit'
45+
git add -A
46+
git commit -s -m 'operator move2kube-operator (${{ github.event.inputs.tag }})'
47+
git push -u origin main
48+
# - name: create-pull-request
49+
# run: |
50+
# curl "https://api.github.com/repos/k8s-operatorhub/community-operators/pulls" --user "${GITHUB_USER}:${GITHUB_TOKEN}" -X POST --data '{"title": "'"$(git log -1 --format=%s)"'", "base": "main", "body": "An automated PR to update konveyor-operator to v'"${OPERATOR_VERSION}"'", "head": "'"${GITHUB_USER}:${OPERATOR_VERSION}"'"}'
51+
- name: checkout-the-move2kube-fork-of-the-prod-upstream-repo
52+
shell: bash
53+
run: |
54+
git clone 'https://move2kube:${{ secrets.MOVE2KUBE_PATOKEN }}@github.com/move2kube/community-operators-prod'
55+
cd community-operators-prod/ || exit 1
56+
git checkout main
57+
git config user.name move2kube
58+
git config user.email [email protected]
59+
echo 'copy-bundle-into-fork-of-prod-repo-creating-new-version-dir'
60+
cd operators/move2kube-operator/ || exit 1
61+
VERSION='${{ github.event.inputs.tag }}'
62+
VERSION_WITHOUT_V="${VERSION#v}"
63+
cp -r /tmp/bundle-operator-move2kube "${VERSION_WITHOUT_V}" && cp /tmp/bundle.Dockerfile "${VERSION_WITHOUT_V}"/bundle.Dockerfile
4164
echo 'make a commit'
4265
git add -A
4366
git commit -s -m 'operator move2kube-operator (${{ github.event.inputs.tag }})'

0 commit comments

Comments
 (0)