-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (39 loc) · 1.13 KB
/
StagedUpload.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
41
42
43
44
45
name: Staged Upload
on:
workflow_call:
inputs:
target_git_describe:
type: string
workflow_dispatch:
inputs:
target_git_describe:
type: string
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
staged-upload:
runs-on: ubuntu-latest
if: ${{ inputs.target_git_describe != '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install
shell: bash
run: pip install awscli
- name: Download from staging bucket
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
TARGET=$(git log -1 --format=%h)
mkdir to_be_uploaded
aws s3 cp --recursive "s3://duckdb-staging/$TARGET/${{ inputs.target_git_describe }}/$GITHUB_REPOSITORY/github_release" to_be_uploaded --region us-east-2
- name: Deploy
shell: bash
run: |
python3 scripts/asset-upload-gha.py to_be_uploaded/*