@@ -13,14 +13,14 @@ inputs:
13
13
fork-repo-name :
14
14
description : " OpenShift operators fork repository name e.g.\" mariadb-operator/community-operators\" ."
15
15
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\" ."
18
18
required : true
19
19
bundle-path-dir :
20
20
description : " Path to the OLM bundle directory."
21
21
required : true
22
22
ci-path-file :
23
- description : " Path to the ci.yaml file"
23
+ description : " Path to the ci.yaml file. "
24
24
required : true
25
25
user-name :
26
26
description : " User name to use in the commit."
41
41
exit 1
42
42
43
43
- name : Check GITHUB_TOKEN env
44
- if : ${{ env.GITHUB_TOKEN == '' }}
44
+ if : ${{ ! env.GITHUB_TOKEN }}
45
45
shell : bash
46
46
run : |
47
47
echo "::error title=⛔ error hint::GITHUB_TOKEN environment variable is mandatory"
53
53
fetch-depth : 0
54
54
repository : " ${{ inputs.fork-repo-name }}"
55
55
path : " ."
56
- token : " ${{ secrets .GITHUB_TOKEN }}"
56
+ token : " ${{ env .GITHUB_TOKEN }}"
57
57
58
58
- name : Configure Git
59
59
shell : bash
@@ -64,16 +64,16 @@ runs:
64
64
- name : Upstream PR
65
65
shell : bash
66
66
env :
67
- GITHUB_TOKEN : " ${{ secrets .GITHUB_TOKEN }}"
67
+ GITHUB_TOKEN : " ${{ env .GITHUB_TOKEN }}"
68
68
run : |
69
69
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 }}"
71
71
git fetch --all
72
72
git reset --hard upstream/main
73
73
74
74
echo "🚀 Copying bundle"
75
75
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 }}"
77
77
78
78
echo "🚀 Copying ci.yaml"
79
79
cp "${{ inputs.ci-path-file }}" "operators/${{ inputs.name }}/"
82
82
git add .
83
83
git commit -m "operator ${{ inputs.name }}(${{ inputs.version }})" --signoff
84
84
git push -f
85
- gh pr create --repo $UPSTREAM_REPO \
85
+ gh pr create --repo "${{ inputs.upstream-repo-name }}" \
86
86
--title "operator ${{ inputs.name }} (${{ inputs.version }})" \
87
87
--body "Added operator ${{ inputs.name }} (${{ inputs.version }})"
0 commit comments