parent
f5521a0184
commit
c41615b6de
|
@ -1,7 +1,7 @@
|
||||||
# Manual deploy workflow for deploying to app.element.io & staging.element.io
|
# Manual deploy workflow for deploying to app.element.io & staging.element.io
|
||||||
# Runs automatically for staging.element.io when an RC or Release is published
|
# Runs automatically for staging.element.io when an RC or Release is published
|
||||||
# Note: Does *NOT* run automatically for app.element.io so that it gets tested on staging.element.io beforehand
|
# Note: Does *NOT* run automatically for app.element.io so that it gets tested on staging.element.io beforehand
|
||||||
name: Build and Deploy ${{ inputs.site }}
|
name: Build and Deploy ${{ inputs.site || 'staging.element.io' }}
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
@ -27,8 +27,13 @@ jobs:
|
||||||
deployments: write
|
deployments: write
|
||||||
env:
|
env:
|
||||||
SITE: ${{ inputs.site || 'staging.element.io' }}
|
SITE: ${{ inputs.site || 'staging.element.io' }}
|
||||||
TARGET_VERSION: ${{ github.ref_name }}
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check inputs
|
||||||
|
if: ${{ startsWith(github.ref_name, 'v') == false }}
|
||||||
|
run: |
|
||||||
|
echo "Only tags starting with 'v' are allowed for deployment"
|
||||||
|
exit 1
|
||||||
|
|
||||||
- name: Load GPG key
|
- name: Load GPG key
|
||||||
run: |
|
run: |
|
||||||
curl https://packages.element.io/element-release-key.gpg | gpg --import
|
curl https://packages.element.io/element-release-key.gpg | gpg --import
|
||||||
|
@ -45,7 +50,7 @@ jobs:
|
||||||
# as then we're just doing a re-deploy of the same version with potentially different configs.
|
# as then we're just doing a re-deploy of the same version with potentially different configs.
|
||||||
- name: Download current version for its old bundles
|
- name: Download current version for its old bundles
|
||||||
id: current_download
|
id: current_download
|
||||||
if: steps.current_version.outputs.version != env.TARGET_VERSION
|
if: steps.current_version.outputs.version != github.ref_name
|
||||||
uses: element-hq/element-web/.github/actions/download-verify-element-tarball@${{ github.ref_name }}
|
uses: element-hq/element-web/.github/actions/download-verify-element-tarball@${{ github.ref_name }}
|
||||||
with:
|
with:
|
||||||
tag: steps.current_version.outputs.version
|
tag: steps.current_version.outputs.version
|
||||||
|
@ -54,7 +59,7 @@ jobs:
|
||||||
- name: Download target version
|
- name: Download target version
|
||||||
uses: element-hq/element-web/.github/actions/download-verify-element-tarball@${{ github.ref_name }}
|
uses: element-hq/element-web/.github/actions/download-verify-element-tarball@${{ github.ref_name }}
|
||||||
with:
|
with:
|
||||||
tag: ${{ github.event.release.tag_name || github.ref_name }}
|
tag: ${{ github.ref_name }}
|
||||||
out-file-path: _deploy
|
out-file-path: _deploy
|
||||||
|
|
||||||
- name: Merge current bundles into target
|
- name: Merge current bundles into target
|
||||||
|
@ -74,7 +79,7 @@ jobs:
|
||||||
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
|
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.sha }}
|
ref: ${{ github.sha }}
|
||||||
running-workflow-name: "Build and Deploy ${{ inputs.site }}"
|
running-workflow-name: "Build and Deploy ${{ env.SITE }}"
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
wait-interval: 10
|
wait-interval: 10
|
||||||
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare|GitHub Pages).)*$
|
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare|GitHub Pages).)*$
|
||||||
|
|
Loading…
Reference in New Issue