Guard reprepro db via concurrency limits (#555)
This commit is contained in:
@@ -39,9 +39,7 @@ on:
|
||||
required: true
|
||||
type: boolean
|
||||
default: true
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
concurrency: ${{ github.workflow }}
|
||||
env:
|
||||
# XXX: UPDATE THIS BEFORE WHEN GOING LIVE
|
||||
R2_BUCKET: "packages-element-io-test"
|
||||
@@ -99,12 +97,12 @@ jobs:
|
||||
needs: prepare
|
||||
name: Linux
|
||||
uses: ./.github/workflows/build_linux.yaml
|
||||
secrets: inherit
|
||||
with:
|
||||
sqlcipher: system
|
||||
deploy-mode: true
|
||||
version: ${{ needs.prepare.outputs.linux-version }}
|
||||
|
||||
# This deploy job only handles Windows & macOS as those are stateless and static.
|
||||
# Linux will be deployed via reprepro after it, but we list it as a dependency to abort if it fails.
|
||||
deploy:
|
||||
needs:
|
||||
- macos
|
||||
@@ -113,7 +111,7 @@ jobs:
|
||||
- windows_64bit
|
||||
runs-on: ubuntu-latest
|
||||
name: Deploy
|
||||
if: always() && (github.event != 'workflow_dispatch' || inputs.deploy)
|
||||
if: github.event != 'workflow_dispatch' || (inputs.deploy && (inputs.macos || inputs.windows_32bit || inputs.windows_64bit))
|
||||
environment: packages.element.io
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
@@ -122,18 +120,7 @@ jobs:
|
||||
name: packages.element.io
|
||||
path: packages.element.io
|
||||
|
||||
- name: Deploy debian repo
|
||||
if: github.event_name != 'workflow_dispatch' || inputs.linux
|
||||
run: |
|
||||
mv packages.element.io/debian .
|
||||
aws s3 cp --recursive debian/ s3://$R2_BUCKET/debian --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 }}
|
||||
R2_URL: ${{ secrets.CF_R2_S3_API }}
|
||||
|
||||
- name: Deploy artifacts
|
||||
if: github.event_name != 'workflow_dispatch' || inputs.macos || inputs.windows_32bit || inputs.windows_64bit
|
||||
run: |
|
||||
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto
|
||||
env:
|
||||
@@ -141,3 +128,15 @@ jobs:
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
||||
R2_URL: ${{ secrets.CF_R2_S3_API }}
|
||||
DEPLOYMENT_DIR: ${{ inputs.mode == 'release' && 'desktop' || 'nightly' }}
|
||||
|
||||
reprepro:
|
||||
needs:
|
||||
- linux
|
||||
# We queue this after the other deploy stage as we want to abort if that fails
|
||||
- deploy
|
||||
name: Run reprepro
|
||||
if: github.event != 'workflow_dispatch' || (inputs.deploy && inputs.linux)
|
||||
uses: ./.github/workflows/reprepro.yaml
|
||||
secrets: inherit
|
||||
with:
|
||||
artifact-name: linux-sqlcipher-system
|
||||
|
||||
Reference in New Issue
Block a user