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 5656 with :
5757 fetch-depth : 0
5858 repository : " ${{ inputs.fork-repo-name }}"
59- path : " . "
59+ path : " fork-repo "
6060 token : " ${{ env.GITHUB_TOKEN }}"
6161
6262 - name : Configure Git
@@ -70,24 +70,32 @@ runs:
7070 env :
7171 GITHUB_TOKEN : " ${{ env.GITHUB_TOKEN }}"
7272 run : |
73+ echo "🚀 Switching directory"
74+ ROOT_DIR=$(pwd)
75+ cd "fork-repo"
76+
7377 echo "🚀 Setting up upstream"
7478 git remote add upstream "https://github.com/${{ inputs.upstream-repo-name }}"
7579 git fetch --all
7680 git reset --hard upstream/main
7781
7882 echo "🚀 Copying bundle"
83+ CI_YAML="${ROOT_DIR}/${{ inputs.ci-path-file }}"
7984 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 }}"
8186
8287 echo "🚀 Copying ci.yaml"
83- cp "${{ inputs.ci-path-file } }" "operators/${{ inputs.name }}/"
88+ cp "${CI_YAML }" "operators/${{ inputs.name }}/"
8489
8590 echo "🚀 Submitting PR"
8691 git add .
8792 git commit -m "operator ${{ inputs.name }}(${{ inputs.version }})" --signoff
8893 git push -f
8994 PR_CMD="gh pr create --repo '${{ inputs.upstream-repo-name }}' --title 'operator ${{ inputs.name }} (${{ inputs.version }})' --body 'Added operator ${{ inputs.name }} (${{ inputs.version }})'"
9095 if [ "${{ inputs.dry-run }}" == "true" ]; then
91- PR_CMD="$PR_CMD --dry-run"
96+ PR_CMD="${ PR_CMD} --dry-run"
9297 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