-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (35 loc) · 1.12 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: S3 artifact
description: 'Upload artifact to artifacts S3 bucket or sync to target bucket'
inputs:
cmd:
description: 'Choose `upload` to upload to artifacts bucket or `deploy` to sync from artifacts to target bucket'
required: true
config:
description: 'Path to s3-artifact-config.yml'
required: true
default: s3-artifact-config.yml
artifacts_s3_path:
description: 'S3 path to store the artifacts'
required: true
environment:
description: 'Required for deploy command to choose target bucket'
required: false
runs:
using: 'composite'
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# Build and install project from pyproject.toml in current directory
- run: pip install .
shell: bash
working-directory: ${{ github.action_path }}
- name: Run
run: s3-artifact
shell: bash
env:
CMD: ${{ inputs.cmd }}
CONFIG: ${{ github.workspace }}/${{ inputs.config }}
ARTIFACTS_S3_PATH: ${{ inputs.artifacts_s3_path }}
ENVIRONMENT: ${{ inputs.environment }}
PYTHONUNBUFFERED: '1'