forked from hpcc-systems/HPCC-Platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,13 @@ jobs: | |
docker cp package-container:/app/output.json ${{ github.workspace }}/output.json | ||
aws s3 cp ${{ github.workspace }}/output.json s3://ebelfarsi-bucket/releases/output.json | ||
- name: Prepare Directory Structure | ||
- name: Download Build Assets | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build-assets # This should match the artifact name uploaded by build-assets.yml | ||
path: ${{ github.workspace }}/build-assets | ||
|
||
- name: Prepare Directory Structure and Copy Real Files | ||
shell: bash | ||
run: | | ||
output_json_path="${{ github.workspace }}/output.json" | ||
|
@@ -66,21 +72,27 @@ jobs: | |
# Create base directory if it doesn't exist | ||
mkdir -p "$base_dir" | ||
# Parse JSON and create directory structure | ||
jq -r '.[] | .Edge_Cast_Path' "$output_json_path" | while read path; do | ||
full_path="${{ github.workspace }}/$path" | ||
# Parse JSON and create directory structure with actual assets | ||
jq -c '.[]' "$output_json_path" | while read -r item; do | ||
edge_cast_path=$(echo "$item" | jq -r '.Edge_Cast_Path') | ||
asset_name=$(basename "$edge_cast_path") | ||
# Construct full path for the asset based on JSON | ||
full_path="${base_dir}/${edge_cast_path}" | ||
mkdir -p "$(dirname "$full_path")" | ||
touch "$full_path" | ||
# Assuming asset files are directly under build-assets and match the names exactly as needed | ||
if [ -f "${{ github.workspace }}/build-assets/${asset_name}" ]; then | ||
cp "${{ github.workspace }}/build-assets/${asset_name}" "$full_path" | ||
else | ||
echo "Asset ${asset_name} not found, skipping..." | ||
fi | ||
done | ||
- name: Sync Directory to S3 Bucket | ||
shell: bash | ||
run: | | ||
output_json_path="${{ github.workspace }}/output.json" | ||
version=$(jq -r '.[0].Version' "$output_json_path") | ||
base_dir="${{ github.workspace }}/releases/CE-Candidate-${version}" | ||
aws s3 sync "$base_dir" s3://ebelfarsi-bucket/releases/CE-Candidate-${version} | ||
|
||
|
||
- name: Upload output.json to GitHub Release | ||
uses: ncipollo/[email protected] | ||
|