Reusable workflows don't help us here

This commit is contained in:
Michael Telatynski 2022-04-27 23:07:06 +01:00
parent a340358551
commit 0e22503860
2 changed files with 24 additions and 28 deletions

View file

@ -3,21 +3,7 @@ on:
pull_request: { } pull_request: { }
push: push:
branches: [ master ] branches: [ master ]
workflow_call: # develop pushes and repository_dispatch handled in build_develop.yaml
inputs:
SENTRY_ORG:
required: true
type: string
SENTRY_PROJECT:
required: true
type: string
secrets:
SENTRY_AUTH_TOKEN:
required: true
SENTRY_DSN:
required: true
SENTRY_URL:
required: true
env: env:
# These must be set for fetchdep.sh to get the right branch # These must be set for fetchdep.sh to get the right branch
REPOSITORY: ${{ github.repository }} REPOSITORY: ${{ github.repository }}
@ -38,16 +24,10 @@ jobs:
- name: Build & Package - name: Build & Package
run: "./scripts/ci_package.sh" run: "./scripts/ci_package.sh"
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_ORG: ${{ inputs.SENTRY_ORG }}
SENTRY_PROJECT: ${{ inputs.SENTRY_PROJECT }}
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: previewbuild name: previewbuild
path: dist/*.tar.gz path: dist/*.tar.gz
retention-days: ${{ github.ref == 'develop' && 1 || 28 }} retention-days: 28

View file

@ -1,5 +1,5 @@
# Separate to the main build workflow for access to the develop # Separate to the main build workflow for access to develop
# secrets environment, reuses the build workflow for heavy lifting. # environment secrets, largely similar to build.yaml.
name: Build and upload sourcemaps to Sentry name: Build and upload sourcemaps to Sentry
on: on:
push: push:
@ -8,14 +8,30 @@ on:
types: [ element-web-notify ] types: [ element-web-notify ]
jobs: jobs:
build: build:
name: "Build" name: "Build Develop"
environment: develop
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: ./.github/workflows/build.yaml - uses: actions/checkout@v2
secrets:
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install Dependencies
run: "./scripts/layered.sh"
- name: Build, Package & Upload sourcemaps
run: "./scripts/ci_package.sh"
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_URL: ${{ secrets.SENTRY_URL }} SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_ORG: sentry SENTRY_ORG: sentry
SENTRY_PROJECT: riot-web SENTRY_PROJECT: riot-web
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: previewbuild
path: dist/*.tar.gz
retention-days: 1