Skip to content

Commit

Permalink
s3 bucket upload edit sx
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelfarsi committed Jul 11, 2024
1 parent ca8b7fd commit b90f014
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/package-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,30 @@ jobs:
- name: Run Docker Container
run: docker run --name package-container -e REPO_OWNER=hpcc-systems -e REPO_NAME=HPCC-Platform -e TAG=community_9.8.2-1 -e GIT_TKN=${{ secrets.LNB_TOKEN }} ebelfarsi/package-manifest:latest

- name: Fetch Output from Container
run: docker cp package-container:/app/output.json ${{ github.workspace }}/output.json
- name: Fetch Output from Container and Upload to S3
run: |
docker cp package-container:/app/output.json ${{ github.workspace }}/output.json
aws s3 cp ${{ github.workspace }}/output.json s3://your-bucket-name/output.json
- name: Prepare Directory Structure
shell: bash
run: |
output_json_path="${{ github.workspace }}/output.json"
version=$(jq -r '.[0].Version' "$output_json_path" | cut -d'-' -f1)
version=$(jq -r '.[0].Version' ${{ github.workspace }}/output.json | cut -d'-' -f1)
base_dir="${{ github.workspace }}/CE-Candidate-${version}"
mkdir -p "$base_dir"
jq -r '.[] | .Edge_Cast_path' "$output_json_path" | while read path; do
jq -r '.[] | .Edge_Cast_path' ${{ github.workspace }}/output.json | while read path; do
full_path="$base_dir/$(echo $path | sed 's#releases/CE-Candidate-[^/]*##')"
mkdir -p "$(dirname "$full_path")"
touch "$full_path"
done
mv "$output_json_path" "$base_dir/output.json"
- name: Sync Directory to S3 Bucket
shell: bash
run: |
output_json_path="${{ github.workspace }}/output.json"
version=$(jq -r '.[0].Version' "$output_json_path" | cut -d'-' -f1)
version=$(jq -r '.[0].Version' ${{ github.workspace }}/output.json | cut -d'-' -f1)
base_dir="${{ github.workspace }}/CE-Candidate-${version}"
aws s3 sync "$base_dir" s3://ebelfarsi-bucket/
- name: Upload output.json to GitHub Release
uses: ncipollo/[email protected]
with:
Expand Down

0 comments on commit b90f014

Please sign in to comment.