-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
41 lines (40 loc) · 1.47 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
41
name: Deploy packages.element.io deb
description: Deploys given deb to packages.element.io reprepro repository
inputs:
file:
description: Name of incoming deb file
required: true
github-token:
description: GitHub token
required: true
bucket-api:
description: S3 API endpoint
required: true
bucket-key-id:
description: S3 access key ID
required: true
bucket-access-key:
description: S3 access key
required: true
runs:
using: composite
steps:
- name: Upload incoming deb
id: upload
shell: bash
run: |
echo "incoming=$(basename $FILE)" >> $GITHUB_OUTPUT
aws s3 cp "$FILE" "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
env:
FILE: ${{ inputs.file }}
R2_URL: ${{ inputs.bucket-api }}
R2_INCOMING_BUCKET: packages-element-io-incoming
AWS_ACCESS_KEY_ID: ${{ inputs.bucket-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.bucket-access-key }}
- name: Notify packages.element.io of incoming deb
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ inputs.github-token }}
repository: vector-im/packages.element.io
event-type: reprepro-incoming
client-payload: '{"incoming": "${{ steps.upload.outputs.incoming }}"}'