Skip to content

Commit

Permalink
ci(test): share environment secrets with pull requests from forked prs (
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg committed Mar 20, 2024
1 parent 86bebf8 commit cb3763e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Tests
on:
pull_request:
pull_request_target:
push:
branches:
- main

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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cb3763e

Please sign in to comment.