dotnet-podcasts/.github/workflows/podcast-api.yml

40 lines
875 B
YAML
Raw Permalink Normal View History

2021-11-30 03:54:48 +08:00
name: Podcast API CICD
on:
push:
2022-12-07 22:28:10 +08:00
branches: [main]
2021-11-30 03:54:48 +08:00
paths:
2022-12-07 22:28:10 +08:00
- "src/Services/Podcasts/**"
- "deploy/Services/api.bicep"
- ".github/workflows/podcast-api.yml"
2021-11-30 03:54:48 +08:00
pull_request:
2022-12-07 22:28:10 +08:00
branches: [main]
2021-11-30 03:54:48 +08:00
paths:
2022-12-07 22:28:10 +08:00
- "src/Services/Podcasts/**"
- ".github/workflows/podcast-api.yml"
2021-11-30 03:54:48 +08:00
workflow_dispatch:
jobs:
2022-12-05 23:52:00 +08:00
buildPushDeployStaging:
2022-12-07 22:28:10 +08:00
name: "staging"
2022-12-05 04:34:01 +08:00
if: "!contains(github.ref, 'refs/heads/main')"
2022-12-05 23:52:00 +08:00
uses: ./.github/workflows/template-api.yml
2022-12-06 00:51:54 +08:00
concurrency:
2022-12-06 00:56:29 +08:00
group: staging-api
2022-12-07 22:28:10 +08:00
cancel-in-progress: true
2022-12-05 23:52:00 +08:00
secrets: inherit
with:
2022-12-07 22:28:10 +08:00
environment: staging
2022-12-05 23:52:00 +08:00
buildPushDeployProd:
2022-12-07 22:28:10 +08:00
name: "prod"
2022-12-05 04:34:01 +08:00
if: contains(github.ref, 'refs/heads/main')
2022-12-05 23:52:00 +08:00
uses: ./.github/workflows/template-api.yml
2022-12-06 00:51:54 +08:00
concurrency:
2022-12-06 00:56:29 +08:00
group: prod-api
2022-12-07 22:28:10 +08:00
cancel-in-progress: true
2022-12-05 23:52:00 +08:00
secrets: inherit
with:
environment: prod