-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (55 loc) · 1.58 KB
/
upload-packages.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Upload package to R2/incoming
on:
workflow_call:
inputs:
pkg-type:
required: true
type: string # stable / nightly
distros:
required: false
type: string
default: '[
"debian-testing",
"debian-sid",
"debian-bullseye",
"debian-bookworm",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-noble",
"ubuntu-lunar",
"ubuntu-mantic"
]'
secrets:
r2-access-key:
required: true
r2-secret-key:
required: true
r2-account-id:
required: true
jobs:
upload-packages:
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
if: github.repository_owner == 'axoflow'
strategy:
matrix:
distro: ${{ fromJson(inputs.distros) }}
fail-fast: false
steps:
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: package-${{ matrix.distro }}
path: package
- name: Upload packages to R2 incoming
working-directory: package
run: |
export AWS_ACCESS_KEY_ID='${{ secrets.r2-access-key }}'
export AWS_SECRET_ACCESS_KEY='${{ secrets.r2-secret-key }}'
export AWS_DEFAULT_REGION='auto'
find * -type f -exec \
aws s3api put-object \
--endpoint-url https://${{ secrets.r2-account-id }}.r2.cloudflarestorage.com \
--bucket axoflow-packages-build \
--key ${{ inputs.pkg-type }}/${{ github.run_id }}/{} \
--body {} \;