From f5cfaac480f1a280f4398e46623bec607589f9f1 Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Mon, 16 Sep 2024 09:01:54 +0900 Subject: [PATCH 1/2] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 220be4e37..507c605c6 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,12 @@ +- [Environment](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment) + ```yaml + environment: + name: ${{ github.event_name == 'release' && 'production' || github.event_name == 'push' && 'development' || github.event_name == 'pull_request' && 'pull_request' }} + ``` + - [Caching](https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows) - General: [actions/cache](https://github.com/actions/cache) From 2e7eb8aaef43ec6a172d8acdad761f169a3c5d2b Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Mon, 16 Sep 2024 09:08:31 +0900 Subject: [PATCH 2/2] Create environment.yaml --- .github/workflows/environment.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/environment.yaml diff --git a/.github/workflows/environment.yaml b/.github/workflows/environment.yaml new file mode 100644 index 000000000..7c99fe50f --- /dev/null +++ b/.github/workflows/environment.yaml @@ -0,0 +1,16 @@ +name: environment +on: + pull_request: + release: + types: + - published + push: + branches: + - main +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: check environment (${{ github.event_name == 'release' && 'production' || github.event_name == 'push' && 'development' || github.event_name == 'pull_request' && 'pull_request' }}) + run: | + echo ${{ github.event_name == 'release' && 'production' || github.event_name == 'push' && 'development' || github.event_name == 'pull_request' && 'pull_request' }}