Skip to content

Commit 9fc10b3

Browse files
committed
copy out all frankenphp* files?
1 parent 41b765c commit 9fc10b3

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/static.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,24 +246,28 @@ jobs:
246246
path: /tmp/metadata-gnu/*
247247
if-no-files-found: error
248248
retention-days: 1
249-
- name: Copy binary
249+
- name: Copy all frankenphp* files
250250
run: |
251251
# shellcheck disable=SC2034
252252
digest=$(jq -r '."static-builder-gnu"."${{ fromJson(needs.prepare.outputs.push) && 'containerimage.digest' || 'containerimage.config.digest' }}"' <<< "${METADATA}")
253-
docker create --platform=${{ matrix.platform }} --name static-builder-gnu "${{ fromJson(needs.prepare.outputs.push) && format('{0}-gnu@{1}', env.IMAGE_NAME, '${digest}') || '${digest}' }}"
254-
docker cp "static-builder-gnu:/go/src/app/dist/${BINARY}" "${BINARY}-gnu"
253+
container_id=$(docker create --platform=${{ matrix.platform }} "${{ fromJson(needs.prepare.outputs.push) && format('{0}-gnu@{1}', env.IMAGE_NAME, '${digest}') || '${digest}' }}")
254+
for file in $(docker run --rm "${{ fromJson(needs.prepare.outputs.push) && format('{0}-gnu@{1}', env.IMAGE_NAME, '${digest}') || '${digest}' }}" sh -c "ls /go/src/app/dist | grep '^frankenphp'"); do
255+
docker cp "${container_id}:/go/src/app/dist/${file}" "./${file}"
256+
done
257+
docker rm "${container_id}"
258+
mv ${BINARY} ${BINARY}-gnu
255259
env:
256260
METADATA: ${{ steps.build.outputs.metadata }}
257261
BINARY: frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}
258262
- name: Upload artifact
259263
if: ${{ !fromJson(needs.prepare.outputs.push) }}
260264
uses: actions/upload-artifact@v4
261265
with:
262-
name: frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}-gnu
263-
path: frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}-gnu
266+
name: frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}-gnu-files
267+
path: frankenphp*
264268
- name: Upload assets
265269
if: fromJson(needs.prepare.outputs.push) && (needs.prepare.outputs.ref || github.ref_type == 'tag')
266-
run: gh release upload "${{ (github.ref_type == 'tag' && github.ref_name) || needs.prepare.outputs.ref }}" frankenphp-linux-${{ matrix.platform == 'linux/amd64' && 'x86_64' || 'aarch64' }}-gnu --repo dunglas/frankenphp --clobber
270+
run: gh release upload "${{ (github.ref_type == 'tag' && github.ref_name) || needs.prepare.outputs.ref }}" frankenphp* --repo dunglas/frankenphp --clobber
267271
env:
268272
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
269273
- if: fromJson(needs.prepare.outputs.push) && (needs.prepare.outputs.ref || github.ref_type == 'tag')

0 commit comments

Comments
 (0)