mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Generate checksums for nightly binaries (#7149)
This commit is contained in:
24
.github/workflows/nightly-build.yaml
vendored
24
.github/workflows/nightly-build.yaml
vendored
@@ -62,15 +62,29 @@ jobs:
|
||||
export GITCOMMIT="$(git describe --no-match --always --abbrev=9 --dirty --broken)-nightly"
|
||||
make cross
|
||||
|
||||
- name: Upload binaries
|
||||
- name: Rename binaries with OS and Arch
|
||||
run: |
|
||||
baseUrl="https://s3.${IBM_CLOUD_REGION}.cloud-object-storage.appdomain.cloud/${IBM_CLOUD_OBJECT_STORAGE_BUCKET}"
|
||||
for f in `find ./dist/bin -type f -name 'odo*'`; do
|
||||
for f in `find ./dist/bin -type f -name 'odo*'`; do
|
||||
bin=$(realpath "$f")
|
||||
targetName=$(basename "$f" .exe)-$(basename $(dirname "$f"))
|
||||
if [[ "${targetName}" == "odo-windows-"* ]]; then
|
||||
targetName="${targetName}.exe"
|
||||
fi
|
||||
ibmcloud cos upload --bucket "${IBM_CLOUD_OBJECT_STORAGE_BUCKET}" --key "${targetName}" --file "${bin}"
|
||||
echo "Binary $bin uploaded successfully and available at: ${baseUrl}/${targetName}"
|
||||
mv "${bin}" $(dirname "$f")/${targetName}
|
||||
done
|
||||
|
||||
- name: Generate SHA-256 checksums
|
||||
run: |
|
||||
for f in `find ./dist/bin -type f -name 'odo*'`; do
|
||||
bin=$(realpath "$f")
|
||||
sha256sum -b "${bin}" | awk '{print $1}' > "${bin}".sha256
|
||||
done
|
||||
|
||||
- name: Upload binaries
|
||||
run: |
|
||||
baseUrl="https://s3.${IBM_CLOUD_REGION}.cloud-object-storage.appdomain.cloud/${IBM_CLOUD_OBJECT_STORAGE_BUCKET}"
|
||||
for f in `find ./dist/bin -type f -name 'odo*'`; do
|
||||
bin=$(realpath "$f")
|
||||
ibmcloud cos upload --bucket "${IBM_CLOUD_OBJECT_STORAGE_BUCKET}" --key $(basename "$f") --file "${bin}"
|
||||
echo "Binary $bin uploaded successfully and available at: ${baseUrl}/$(basename "$f")"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user