mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-19 07:54:59 +01:00
1e5932cea2
* Move element-io-archive-keyring * Move debian conf * Move packages.element.io * Delegate reprepro to packages.element.io * Iterate * Stash * Iterate * Iterate * Iterate
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
artifact-name:
|
|
type: string
|
|
required: true
|
|
description: "The name of the artifact containing the deb to include"
|
|
secrets:
|
|
ELEMENT_BOT_TOKEN:
|
|
required: true
|
|
CF_R2_ACCESS_KEY_ID:
|
|
required: true
|
|
CF_R2_TOKEN:
|
|
required: true
|
|
# Protect reprepro database using concurrency
|
|
concurrency: reprepro
|
|
jobs:
|
|
reprepro:
|
|
name: Deploy debian package
|
|
environment: packages.element.io
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }}
|
|
R2_URL: ${{ vars.CF_R2_S3_API }}
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: ${{ inputs.artifact-name }}
|
|
path: dist
|
|
|
|
- name: Upload incoming deb
|
|
id: upload
|
|
run: |
|
|
deb="$(ls dist/*.deb | tail -n1)"
|
|
echo "incoming=$deb" >> $GITHUB_OUTPUT
|
|
aws s3 cp "$deb" "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
|
|
|
- name: Notify packages.element.io of incoming deb
|
|
uses: peter-evans/repository-dispatch@26b39ed245ab8f31526069329e112ab2fb224588 # v2
|
|
with:
|
|
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
repository: vector-im/packages.element.io
|
|
event-type: reprepro-incoming
|
|
client-payload: '{"incoming": "${{ steps.upload.outputs.incoming }}"}'
|