77 default : ' 22'
88 required : false
99 type : string
10- go-version :
11- description : go version
12- required : true
13- type : string
1410 upstream :
1511 description : Upstream repo path in owner/repo format
1612 required : true
@@ -137,12 +133,12 @@ jobs:
137133 repository : ${{ inputs.downstream }}
138134 fetch-depth : 0
139135 ref : ${{ inputs.downstream-branch }}
140- - name : Fetch all upstream tags
136+ - name : Fetch upstream tag
141137 run : |
142138 git config user.name 'github-actions[bot]'
143139 git config user.email 'github-actions[bot]@users.noreply.github.com'
144140 git config --global core.editor "/bin/true"
145- git fetch https://github.com/${{ inputs.upstream }} --tags
141+ git fetch --no-tags https://github.com/${{ inputs.upstream }} tag ${{ steps.upstream.outputs.release }}
146142 - name : Merge with upstream ${{ steps.upstream.outputs.release }} tag
147143 id : merge
148144 run : |
@@ -166,10 +162,12 @@ jobs:
166162 - name : Resolve conflict due to deleted downstream files
167163 if : ${{ steps.merge.outputs.MERGE_CONFLICT == 'true' }}
168164 run : |
169- git status --porcelain | awk '{ if ($1=="DU") print $2 }' | xargs -I {} git rm {}
165+ git status --porcelain | awk '{ if ($1=="UD" || $1=="DU") print $2 }' | xargs -I {} git rm {}
170166 - name : Continue after merge conflict
171167 if : ${{ steps.merge.outputs.MERGE_CONFLICT == 'true' }}
172- run : git merge --continue
168+ run : |
169+ git add -A
170+ git merge --continue
173171 - name : Add or update VERSION file
174172 run : |
175173 # All tags use the vX.Y.Z format currently.
@@ -191,7 +189,7 @@ jobs:
191189 git diff --cached --exit-code || git commit -s -m "[bot] add VERSION file with ${version_from_tag}"
192190 - uses : actions/setup-go@v5
193191 with :
194- go-version : ${{ inputs.go-version }}
192+ go-version-file : go.mod
195193 - uses : actions/setup-node@v4
196194 with :
197195 node-version : ${{ inputs.node-version }}
@@ -242,11 +240,6 @@ jobs:
242240 go mod tidy
243241 go mod vendor
244242 ${{ inputs.assets-cmd }}
245- if [ -f scripts/rh-manifest.sh ]; then
246- bash scripts/rh-manifest.sh
247- git add rh-manifest.txt
248- git diff --cached --exit-code || git commit -s -m "[bot] update rh-manifest.txt"
249- fi
250243 ```
251244 author : ' github-actions[bot]<github-actions[bot]@users.noreply.github.com>'
252245 committer : ' github-actions[bot]<github-actions[bot]@users.noreply.github.com>'
0 commit comments