Skip to content

Commit 42d6feb

Browse files
author
Aliaksandr Adziareika
committed
<TBBAS-2530> Add download framework action
1 parent 935e446 commit 42d6feb

File tree

2 files changed

+51
-15
lines changed

2 files changed

+51
-15
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Download openDAQ framework package from S3
2+
description: "Download a package from S3 and install it depending on OS and architecture"
3+
inputs:
4+
s3_bucket:
5+
required: true
6+
description: "S3 bucket name"
7+
s3_path:
8+
required: true
9+
description: "Path to package in bucket (without OS/arch)"
10+
s3_artefact:
11+
required: true
12+
description: "Filename in the S3 bucket"
13+
download_dir:
14+
required: false
15+
default: "."
16+
runs:
17+
using: composite
18+
steps:
19+
- name: Prepare AWS CLI for S3
20+
uses: aws-actions/configure-aws-credentials@v4
21+
with:
22+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
23+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24+
aws-region: ${{ secrets.AWS_REGION }}
25+
26+
- name: Download package from S3
27+
run: |
28+
aws s3 cp "s3://${{ inputs.s3_bucket }}/${{ inputs.s3_path }}/${{ inputs.s3_artefact }}" "${{ inputs.download_dir }}"

.github/workflows/opendaq-download-framework-aws.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,37 @@ on:
66

77
env:
88
s3bucket: bb-blueberry-sdk-releases
9-
s3sdk_path: /releases/main/SDK
9+
s3sdk_path: releases/main/SDK
10+
s3artefact: opendaq-3.21.0-ubuntu22.04-x86_64_ffc93d2.deb
1011

1112
jobs:
1213
build:
1314
runs-on: ubuntu-latest
1415
steps:
1516

16-
- name: Configuring
17-
uses: aws-actions/configure-aws-credentials@v4
18-
with:
19-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
20-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
21-
aws-region: ${{ secrets.AWS_REGION }}
17+
# - name: Configuring
18+
# uses: aws-actions/configure-aws-credentials@v4
19+
# with:
20+
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
21+
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22+
# aws-region: ${{ secrets.AWS_REGION }}
2223

23-
- name: Enumerate artifacts
24-
run: |
25-
echo "Available artifacts:"
26-
aws s3 ls "s3://${{ env.s3bucket }}${{env.s3sdk_path}}" --human-readable
24+
# - name: Enumerate artifacts
25+
# run: |
26+
# echo "Available artifacts:"
27+
# aws s3 ls "s3://${{ env.s3bucket }}${{env.s3sdk_path}}" --human-readable
28+
29+
- name: Download openDAQ framework
30+
uses: ./.github/actions/framework-download-s3
31+
with:
32+
s3_bucket: ${{ env.s3bucket }}
33+
s3_path: ${{ env.s3sdk_path }}
34+
s3_artefact: ${{ env.s3artefact }}
2735

28-
- name: Download artifact
29-
run: |
30-
echo "Downloading to $(pwd)"
31-
aws s3 cp "s3://${{ env.s3bucket }}${{env.s3sdk_path}}/opendaq-3.21.0-ubuntu22.04-x86_64_ffc93d2.deb" .
36+
# - name: Download artifact
37+
# run: |
38+
# echo "Downloading to $(pwd)"
39+
# aws s3 cp "s3://${{ env.s3bucket }}${{env.s3sdk_path}}/opendaq-3.21.0-ubuntu22.04-x86_64_ffc93d2.deb" .
3240

3341
- name: Uploadading artifact
3442
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)