ci(test): share environment secrets with pull requests from forked prs (#297)

This commit is contained in:
Ethan Zimbelman
2024-03-20 11:10:05 -07:00
committed by GitHub
parent 86bebf87bf
commit cb3763edf2
+12 -1
View File
@@ -1,6 +1,6 @@
name: Tests
on:
pull_request:
pull_request_target:
push:
branches:
- main
@@ -8,8 +8,11 @@ on:
jobs:
unit_tests:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- run: npm test
@@ -18,6 +21,8 @@ jobs:
environment: staging
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- name: Post message to Slack via botToken
id: slackToken
@@ -51,6 +56,8 @@ jobs:
environment: staging
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- run: echo "${{ github.event_name }}"
- name: push trigger
@@ -85,6 +92,8 @@ jobs:
environment: staging
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- run: echo "${{ github.event_name }}"
- name: Post message to Slack via incoming webhook
@@ -106,6 +115,8 @@ jobs:
environment: staging
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- name: Dump out GitHub Context
run: echo $JSON