-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 938 Bytes
/
will_fail.yml
File metadata and controls
34 lines (29 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This should only trigger for changes to the staging branch
# No need to run unit tests
# How can we validate that infrastructure exist?
name: Fail on purpose
on:
push:
branches:
- fail
jobs:
validate-secrets-fail:
runs-on: ubuntu-latest
environment: staging # Set the `environment` key to use
steps:
# Ensure that other env secrets are inaccessible
- name: Production secret
env:
PROD_SECRET: ${{ secrets.PROD_SECRET }}
if: env.PROD_SECRET == null
run: |
echo "Success! Product secret is inaccessible. Will exit now!"
exit 1
validate-infrastructure-never-run:
# This should never run because the previous job should fail ...
needs: validate-secrets-fail
runs-on: ubuntu-latest
environment: staging
steps:
- name: Validate required infrastructure
run: echo "Running Python script to validate infra ..."