Skip to content

Commit

Permalink
Create ci-forked-env.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas authored Nov 28, 2023
1 parent 10d6b84 commit 45ab622
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci-forked-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
pull_request_target:
branches: [ master ]

jobs:
approve: # First step
runs-on: ubuntu-latest

steps:
- name: Approve
run: echo For security reasons, all pull requests need to be approved first before running any automated CI.

build: # Second step
runs-on: ubuntu-latest

needs: [approve] # Require the first step to finish
environment:
name: approved-forks # Our dummy environment
steps:
- name: Test secret
run: |
echo "Test secret => ${TEST_SECRET}"
if [[ "x${{ secrets.TEST_SECRET }}" == "x442" ]]; then
echo "secret is good"
else
echo "no secrets"
exit 1
fi
env:
TEST_SECRET: ${{ secrets.ENV_SECRET }}

0 comments on commit 45ab622

Please sign in to comment.