From 415e3f8eefd2d2668e396be008e8b363c0bcc4c0 Mon Sep 17 00:00:00 2001 From: bkuhl Date: Wed, 8 Jan 2025 13:40:24 -0500 Subject: [PATCH] Add example workflow --- .../workflows/run-against-environment.yaml | 22 +++++++++++++++++++ README.md | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run-against-environment.yaml diff --git a/.github/workflows/run-against-environment.yaml b/.github/workflows/run-against-environment.yaml new file mode 100644 index 0000000..e6fac04 --- /dev/null +++ b/.github/workflows/run-against-environment.yaml @@ -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..." \ No newline at end of file diff --git a/README.md b/README.md index 237aefa..e6c470b 100644 --- a/README.md +++ b/README.md @@ -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.