@@ -13,14 +13,14 @@ inputs:
1313 fork-repo-name :
1414 description : " OpenShift operators fork repository name e.g.\" mariadb-operator/community-operators\" ."
1515 required : true
16- upstream-repo-url :
17- description : " OpenShift operators upstream repository https URL e.g.\" https://github.com/ k8s-operatorhub/community-operators\" ."
16+ upstream-repo-name :
17+ description : " OpenShift operators upstream repository name e.g.\" k8s-operatorhub/community-operators\" ."
1818 required : true
1919 bundle-path-dir :
2020 description : " Path to the OLM bundle directory."
2121 required : true
2222 ci-path-file :
23- description : " Path to the ci.yaml file"
23+ description : " Path to the ci.yaml file. "
2424 required : true
2525 user-name :
2626 description : " User name to use in the commit."
4141 exit 1
4242
4343 - name : Check GITHUB_TOKEN env
44- if : ${{ env.GITHUB_TOKEN == '' }}
44+ if : ${{ ! env.GITHUB_TOKEN }}
4545 shell : bash
4646 run : |
4747 echo "::error title=⛔ error hint::GITHUB_TOKEN environment variable is mandatory"
5353 fetch-depth : 0
5454 repository : " ${{ inputs.fork-repo-name }}"
5555 path : " ."
56- token : " ${{ secrets .GITHUB_TOKEN }}"
56+ token : " ${{ env .GITHUB_TOKEN }}"
5757
5858 - name : Configure Git
5959 shell : bash
@@ -64,16 +64,16 @@ runs:
6464 - name : Upstream PR
6565 shell : bash
6666 env :
67- GITHUB_TOKEN : " ${{ secrets .GITHUB_TOKEN }}"
67+ GITHUB_TOKEN : " ${{ env .GITHUB_TOKEN }}"
6868 run : |
6969 echo "🚀 Setting up upstream"
70- git remote add upstream "${{ inputs.upstream-repo-url }}"
70+ git remote add upstream "https://github.com/ ${{ inputs.upstream-repo-name }}"
7171 git fetch --all
7272 git reset --hard upstream/main
7373
7474 echo "🚀 Copying bundle"
7575 mkdir -p "operators/${{ inputs.name }}/${{ inputs.version }}"
76- cp -Tr "${{ inputs.bundle-path-dir }}" "operators/${{ inputs.name }}/${{ inputs.version }}"
76+ cp -r "${{ inputs.bundle-path-dir }}"/* "operators/${{ inputs.name }}/${{ inputs.version }}"
7777
7878 echo "🚀 Copying ci.yaml"
7979 cp "${{ inputs.ci-path-file }}" "operators/${{ inputs.name }}/"
8282 git add .
8383 git commit -m "operator ${{ inputs.name }}(${{ inputs.version }})" --signoff
8484 git push -f
85- gh pr create --repo $UPSTREAM_REPO \
85+ gh pr create --repo "${{ inputs.upstream-repo-name }}" \
8686 --title "operator ${{ inputs.name }} (${{ inputs.version }})" \
8787 --body "Added operator ${{ inputs.name }} (${{ inputs.version }})"
0 commit comments