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: { }
push:
branches: [ master ]
workflow_call:
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
# develop pushes and repository_dispatch handled in build_develop.yaml
env:
# These must be set for fetchdep.sh to get the right branch
REPOSITORY: ${{ github.repository }}
@ -38,16 +24,10 @@ jobs:
- name: Build & Package
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
uses: actions/upload-artifact@v2
with:
name: previewbuild
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
# secrets environment, reuses the build workflow for heavy lifting.
# Separate to the main build workflow for access to develop
# environment secrets, largely similar to build.yaml.
name: Build and upload sourcemaps to Sentry
on:
push:
@ -8,14 +8,30 @@ on:
types: [ element-web-notify ]
jobs:
build:
name: "Build"
environment: develop
name: "Build Develop"
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/build.yaml
secrets:
- uses: actions/checkout@v2
- 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_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_ORG: sentry
SENTRY_PROJECT: riot-web
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: previewbuild
path: dist/*.tar.gz
retention-days: 1