-
Notifications
You must be signed in to change notification settings - Fork 30
50 lines (47 loc) · 1.43 KB
/
_extension_archive.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
46
47
48
49
50
#
# Reusable workflow that deploys the extensions source code
name: Extension Archieve Sources
on:
workflow_call:
inputs:
# The name of the extension
extension_name:
required: true
type: string
repository:
required: false
type: string
default: ""
ref:
required: false
type: string
default: ""
jobs:
fetch_repo:
name: Fetch repo and save
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
fetch-depth: 0
submodules: 'true'
path: ./repo
- name: Compress the repository sources
run: |
rm -rf repo/duckdb
zip -9 -r compressed.zip repo
- name: Deploy the submodule
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DUCKDB_COMMUNITY_EXTENSION_S3_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DUCKDB_COMMUNITY_EXTENSION_S3_SECRET }}
AWS_DEFAULT_REGION: ${{ secrets.S3_DUCKDB_ORG_REGION }}
BUCKET_NAME: duckdb-community-extensions
PIP_BREAK_SYSTEM_PACKAGES: 1
run: |
python3 -m pip install awscli
if [ "${AWS_SECRET_ACCESS_KEY}" ]; then
aws s3 cp compressed.zip s3://${BUCKET_NAME}/archived_extension_sources/${{ inputs.extension_name }}/repo_sources_${{ inputs.ref }}.zip
fi