Skip to content

Commit 415e3f8

Browse files
committed
Add example workflow
1 parent b9e56dd commit 415e3f8

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Run with Approval
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: hs-small
12+
steps:
13+
- name: Build
14+
run: |
15+
echo "Can run anytime, without limitations..."
16+
against-test-environment-1-only:
17+
runs-on: hs-small
18+
environment: test-environment-1
19+
steps:
20+
- name: Build
21+
run: |
22+
echo "This will only run against production, and will obey any rules in place..."

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# gha-environment-restrictions-testing
2-
A test repository for experimenting with environment restrictions
2+
3+
This is a test repository to demonstrate how environment restrictions work within GitHub Actions.

0 commit comments

Comments
 (0)