-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaction.yaml
More file actions
53 lines (46 loc) · 1.92 KB
/
Copy pathaction.yaml
File metadata and controls
53 lines (46 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (c) 2025 Erick Bourgeois, finos
# SPDX-License-Identifier: Apache-2.0
name: 'Prepare Docker Binaries'
description: 'Downloads artifacts and prepares binaries for multi-arch Docker build'
runs:
using: composite
steps:
- name: Download all binary artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: ./artifacts
pattern: 5spot-linux-*
- name: Prepare binaries for Docker build
shell: bash
run: |
mkdir -p binaries/amd64 binaries/arm64
# Debug: Show what was downloaded
echo "Downloaded artifacts:"
find artifacts/ -type f -name "5spot" -o -name "*.cdx.*"
# Copy x86_64 binary
AMD64_BINARY=$(find artifacts/5spot-linux-amd64 -type f -name "5spot" | head -1)
if [ -n "$AMD64_BINARY" ] && [ -f "$AMD64_BINARY" ]; then
cp "$AMD64_BINARY" binaries/amd64/5spot
chmod +x binaries/amd64/5spot
echo "Copied x86_64 binary from $AMD64_BINARY"
else
echo "ERROR: x86_64 binary not found"
echo "Contents of artifacts/5spot-linux-amd64:"
find artifacts/5spot-linux-amd64 -ls || echo "Directory does not exist"
exit 1
fi
# Copy ARM64 binary
ARM64_BINARY=$(find artifacts/5spot-linux-arm64 -type f -name "5spot" | head -1)
if [ -n "$ARM64_BINARY" ] && [ -f "$ARM64_BINARY" ]; then
cp "$ARM64_BINARY" binaries/arm64/5spot
chmod +x binaries/arm64/5spot
echo "Copied ARM64 binary from $ARM64_BINARY"
else
echo "ERROR: ARM64 binary not found"
echo "Contents of artifacts/5spot-linux-arm64:"
find artifacts/5spot-linux-arm64 -ls || echo "Directory does not exist"
exit 1
fi
# Verify binaries
ls -lh binaries/amd64/5spot binaries/arm64/5spot
file binaries/amd64/5spot binaries/arm64/5spot