Skip to content

Commit 4ca3f68

Browse files
authored
Merge pull request #10 from quic-viskuma/aws
refactor: replace boto3-based upload with AWS CLI
2 parents 701ec69 + 40e9b32 commit 4ca3f68

File tree

4 files changed

+17
-88
lines changed

4 files changed

+17
-88
lines changed

.github/workflows/unit-test.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,6 @@ on:
77
- main
88

99
jobs:
10-
lint:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
with:
15-
fetch-depth: 0
16-
17-
- name: Set up Python
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: '3.11'
21-
22-
- name: Install dependencies
23-
run: |
24-
pip install black mypy types-requests types-boto3
25-
26-
- name: Run mypy
27-
run: |
28-
mypy ./publish_artifacts.py
29-
30-
- name: Run black
31-
run: |
32-
black --check --diff ./publish_artifacts.py
33-
34-
3510
unit-test:
3611
runs-on: ubuntu-latest
3712
steps:

action.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,26 @@ inputs:
1515
runs:
1616
using: "composite"
1717
steps:
18-
- name: Set up Python
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: '3.13'
22-
23-
- name: Cache Python dependencies
24-
uses: actions/cache@v3
25-
with:
26-
path: ~/.cache/pip
27-
key: ${{ runner.os }}-pip-${{ hashFiles('${{ github.action_path }}/requirements.txt') }}
28-
restore-keys: |
29-
${{ runner.os }}-pip-
18+
- name: Ensure AWS CLI is available
19+
shell: bash
20+
run: |
21+
if ! command -v aws &> /dev/null; then
22+
echo "Installing AWS CLI..."
23+
apt-get update && apt-get install -y awscli
24+
else
25+
echo "AWS CLI is already available."
26+
fi
3027
31-
- name: Install dependencies
28+
- name: Check AWS credentials
3229
shell: bash
33-
run: pip install -r ${{ github.action_path }}/requirements.txt
30+
run: |
31+
if ! aws sts get-caller-identity &> /dev/null; then
32+
echo "AWS credentials are missing or invalid."
33+
exit 1
34+
fi
3435
3536
- name: Upload artifacts
3637
shell: bash
3738
run: |
38-
python ${{ github.action_path }}/publish_artifacts.py \
39-
--path "${{ inputs.path }}" \
40-
--destination "${{ inputs.destination }}" \
41-
--s3-bucket "${{ inputs.s3_bucket }}"
39+
aws s3 cp "${{ inputs.path }}" "s3://${{ inputs.s3_bucket }}/${{ inputs.destination }}" --recursive
40+

publish_artifacts.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)