File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -191,14 +191,17 @@ jobs:
191191 - name : Prepare variables
192192 id : prep
193193 run : |
194+ # Find version number and types of built artifacts
194195 echo "version=$(cat ./distributions/${{ inputs.distribution }}/dist/**/metadata.json | jq -r '.version')" >> "$GITHUB_OUTPUT"
195196 echo "types=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq '[.[].type]' | tr -d '\n' )" >> "$GITHUB_OUTPUT"
196197
198+ # Find GOOS and GOARCH
197199 os=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r '.[] | select(.name | contains(".tar.gz")) | .goos')
198200 arch=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r '.[] | select(.name | contains(".tar.gz")) | .goarch')
199201 echo "arch=$os-$arch" >> "$GITHUB_OUTPUT"
200202
201- #container-images=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq 'map(select(any(.type; contains("Docker Image"))).type) | unique') >> "$GITHUB_OUTPUT"
203+ # Find binary path
204+ echo "binary-path=$(cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json | jq -r 'map(select(any(.type; contains("Binary")))) | .[].path' )" >> "$GITHUB_OUTPUT"
202205
203206 - name : Print version and target
204207 run : |
@@ -207,6 +210,9 @@ jobs:
207210 echo 'Arch: ${{ steps.prep.outputs.arch }}'
208211 echo 'Images?: ${{ steps.prep.outputs.container-images }}'
209212
213+ - name : Copy binary to distro root folder
214+ run : cp ./distributions/${{ inputs.distribution }}/${{ steps.prep.outputs.binary-path }} ./distributions/${{ inputs.distribution }}
215+
210216 - name : Build container images locally
211217 if : contains(steps.prep.outputs.types, 'Docker Image')
212218 uses : docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
You can’t perform that action at this time.
0 commit comments