@@ -36,18 +36,28 @@ jobs:
36
36
git checkout main
37
37
git config user.name move2kube
38
38
git config user.email [email protected]
39
+ echo 'sync our fork with upstream'
40
+ git remote add upstream https://github.com/k8s-operatorhub/community-operators
41
+ git fetch --all
42
+ git rebase upstream/main
39
43
echo 'copy-bundle-into-fork-creating-new-version-dir'
40
44
cd operators/move2kube-operator/ || exit 1
41
45
VERSION='${{ github.event.inputs.tag }}'
42
46
VERSION_WITHOUT_V="${VERSION#v}"
43
47
cp -r /tmp/bundle-operator-move2kube "${VERSION_WITHOUT_V}" && cp /tmp/bundle.Dockerfile "${VERSION_WITHOUT_V}"/bundle.Dockerfile
44
- echo 'make a commit'
48
+ echo 'make a commit and push to our fork '
45
49
git add -A
46
50
git commit -s -m 'operator move2kube-operator (${{ github.event.inputs.tag }})'
47
51
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}"'"}'
52
+ - name : create-pull-request-to-community-repo
53
+ run : |
54
+ curl -L \
55
+ -X POST \
56
+ -H 'Accept: application/vnd.github+json' \
57
+ -H 'Authorization: Bearer ${{ secrets.MOVE2KUBE_PATOKEN }}' \
58
+ -H 'X-GitHub-Api-Version: 2022-11-28' \
59
+ https://api.github.com/repos/k8s-operatorhub/community-operators/pulls \
60
+ -d '{"title":"operator move2kube-operator (${{ github.event.inputs.tag }})","body":"An automated PR to update move2kube-operator to ${{ github.event.inputs.tag }}","head":"move2kube:main","base":"main"}'
51
61
- name : checkout-the-move2kube-fork-of-the-prod-upstream-repo
52
62
shell : bash
53
63
run : |
@@ -56,15 +66,25 @@ jobs:
56
66
git checkout main
57
67
git config user.name move2kube
58
68
git config user.email [email protected]
69
+ echo 'sync our fork with upstream'
70
+ git remote add upstream https://github.com/redhat-openshift-ecosystem/community-operators-prod
71
+ git fetch --all
72
+ git rebase upstream/main
59
73
echo 'copy-bundle-into-fork-of-prod-repo-creating-new-version-dir'
60
74
cd operators/move2kube-operator/ || exit 1
61
75
VERSION='${{ github.event.inputs.tag }}'
62
76
VERSION_WITHOUT_V="${VERSION#v}"
63
77
cp -r /tmp/bundle-operator-move2kube "${VERSION_WITHOUT_V}" && cp /tmp/bundle.Dockerfile "${VERSION_WITHOUT_V}"/bundle.Dockerfile
64
- echo 'make a commit'
78
+ echo 'make a commit and push to our fork '
65
79
git add -A
66
80
git commit -s -m 'operator move2kube-operator (${{ github.event.inputs.tag }})'
67
81
git push -u origin main
68
- # - name: create-pull-request
69
- # run: |
70
- # 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}"'"}'
82
+ - name : create-pull-request-to-prod-repo
83
+ run : |
84
+ curl -L \
85
+ -X POST \
86
+ -H 'Accept: application/vnd.github+json' \
87
+ -H 'Authorization: Bearer ${{ secrets.MOVE2KUBE_PATOKEN }}' \
88
+ -H 'X-GitHub-Api-Version: 2022-11-28' \
89
+ https://api.github.com/repos/redhat-openshift-ecosystem/community-operators-prod/pulls \
90
+ -d '{"title":"operator move2kube-operator (${{ github.event.inputs.tag }})","body":"An automated PR to update move2kube-operator to ${{ github.event.inputs.tag }}","head":"move2kube:main","base":"main"}'
0 commit comments