mirror of
https://github.com/koreanbots/core.git
synced 2026-02-01 17:20:24 +00:00
ci: passing source branch env only at push
This commit is contained in:
parent
a20a8b18bd
commit
acd679abaf
12
.github/workflows/testing.yml
vendored
12
.github/workflows/testing.yml
vendored
@ -1,5 +1,12 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'stable'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
jobs:
|
jobs:
|
||||||
eslint:
|
eslint:
|
||||||
name: ESLint
|
name: ESLint
|
||||||
@ -52,7 +59,6 @@ jobs:
|
|||||||
- name: Create needed files
|
- name: Create needed files
|
||||||
run: echo '{"tester":"DEMO_KEY"}' > secret.json
|
run: echo '{"tester":"DEMO_KEY"}' > secret.json
|
||||||
- name: Build
|
- name: Build
|
||||||
if: success() && github.ref == 'refs/heads/master'
|
|
||||||
run: yarn build
|
run: yarn build
|
||||||
env:
|
env:
|
||||||
NEXT_PUBLIC_SENTRY_SERVER_ROOT_DIR: ./api
|
NEXT_PUBLIC_SENTRY_SERVER_ROOT_DIR: ./api
|
||||||
@ -60,7 +66,7 @@ jobs:
|
|||||||
SENTRY_PROJECT: v2
|
SENTRY_PROJECT: v2
|
||||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
SOURCE_BRANCH: ${{ github.head_ref }}
|
SOURCE_BRANCH: ${{ github.event_name == 'push' && github.head_ref || null }}
|
||||||
SOURCE_COMMIT: ${{ github.sha }}
|
SOURCE_COMMIT: ${{ github.sha }}
|
||||||
CI: true
|
CI: true
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user