Skip to content

Commit

Permalink
Add example workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bkuhl committed Jan 8, 2025
1 parent b9e56dd commit 415e3f8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/run-against-environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run with Approval

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: hs-small
steps:
- name: Build
run: |
echo "Can run anytime, without limitations..."
against-test-environment-1-only:
runs-on: hs-small
environment: test-environment-1
steps:
- name: Build
run: |
echo "This will only run against production, and will obey any rules in place..."
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# gha-environment-restrictions-testing
A test repository for experimenting with environment restrictions

This is a test repository to demonstrate how environment restrictions work within GitHub Actions.

0 comments on commit 415e3f8

Please sign in to comment.