File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 56
56
with :
57
57
fetch-depth : 0
58
58
repository : " ${{ inputs.fork-repo-name }}"
59
- path : " . "
59
+ path : " fork-repo "
60
60
token : " ${{ env.GITHUB_TOKEN }}"
61
61
62
62
- name : Configure Git
@@ -70,24 +70,32 @@ runs:
70
70
env :
71
71
GITHUB_TOKEN : " ${{ env.GITHUB_TOKEN }}"
72
72
run : |
73
+ echo "🚀 Switching directory"
74
+ ROOT_DIR=$(pwd)
75
+ cd "fork-repo"
76
+
73
77
echo "🚀 Setting up upstream"
74
78
git remote add upstream "https://github.com/${{ inputs.upstream-repo-name }}"
75
79
git fetch --all
76
80
git reset --hard upstream/main
77
81
78
82
echo "🚀 Copying bundle"
83
+ CI_YAML="${ROOT_DIR}/${{ inputs.ci-path-file }}"
79
84
mkdir -p "operators/${{ inputs.name }}/${{ inputs.version }}"
80
- rsync -av --exclude="ci.yaml " "${{ inputs.bundle-path-dir }}/" "operators/${{ inputs.name }}/${{ inputs.version }}"
85
+ rsync -av --exclude="${CI_YAML} " "${ROOT_DIR}/ ${{ inputs.bundle-path-dir }}/" "operators/${{ inputs.name }}/${{ inputs.version }}"
81
86
82
87
echo "🚀 Copying ci.yaml"
83
- cp "${{ inputs.ci-path-file } }" "operators/${{ inputs.name }}/"
88
+ cp "${CI_YAML }" "operators/${{ inputs.name }}/"
84
89
85
90
echo "🚀 Submitting PR"
86
91
git add .
87
92
git commit -m "operator ${{ inputs.name }}(${{ inputs.version }})" --signoff
88
93
git push -f
89
94
PR_CMD="gh pr create --repo '${{ inputs.upstream-repo-name }}' --title 'operator ${{ inputs.name }} (${{ inputs.version }})' --body 'Added operator ${{ inputs.name }} (${{ inputs.version }})'"
90
95
if [ "${{ inputs.dry-run }}" == "true" ]; then
91
- PR_CMD="$PR_CMD --dry-run"
96
+ PR_CMD="${ PR_CMD} --dry-run"
92
97
fi
93
- eval "$PR_CMD"
98
+ eval "${PR_CMD}"
99
+
100
+ echo "🚀 Switching back to root directory"
101
+ cd "${ROOT_DIR}"
You can’t perform that action at this time.
0 commit comments