Skip to content

Commit

Permalink
other pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf committed Feb 9, 2024
1 parent 7c4b1fe commit 4dc30bb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ on:
- "pom.xml"

workflow_dispatch:
inputs:
env:
type: choice
description: Environment
options:
- dev
- uat
- prod

jobs:

release_dev:
uses: ./.github/workflows/call_release_function.yml
name: '[Dev] OnBoarding function Release'
if: github.ref_name == 'main'
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }}
secrets: inherit
with:
environment: dev
Expand All @@ -26,7 +34,7 @@ jobs:
release_uat:
uses: ./.github/workflows/call_release_function.yml
name: '[UAT] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }}
secrets: inherit
with:
environment: uat
Expand All @@ -35,7 +43,7 @@ jobs:
release_prod:
uses: ./.github/workflows/call_release_function.yml
name: '[Prod] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ inputs.env == 'prod' }}
secrets: inherit
with:
environment: prod
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/release_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ on:
- prod

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Print if
id: print-if
run: |
echo "${{startsWith(github.ref_name, 'releases/') != true && inputs.env == null }}"

release_dev:
uses: ./.github/workflows/call_release_ms.yml
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release_pnpg_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ on:
- "pom.xml"

workflow_dispatch:
inputs:
env:
type: choice
description: Environment
options:
- dev
- uat
- prod

jobs:

release_dev:
uses: ./.github/workflows/call_release_function.yml
name: '[Dev] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/') != true
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }}
secrets: inherit
with:
environment: dev
Expand All @@ -26,7 +34,7 @@ jobs:
release_uat:
uses: ./.github/workflows/call_release_function.yml
name: '[UAT] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }}
secrets: inherit
with:
environment: uat
Expand All @@ -35,7 +43,7 @@ jobs:
release_prod:
uses: ./.github/workflows/call_release_function.yml
name: '[Prod] OnBoarding function Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ inputs.env == 'prod' }}
secrets: inherit
with:
environment: prod
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/release_pnpg_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ on:
- "pom.xml"

workflow_dispatch:
inputs:
env:
type: choice
description: Environment
options:
- dev
- uat
- prod

jobs:

release_dev:
uses: ./.github/workflows/call_release_ms.yml
name: '[Dev] OnBoarding ms Release'
if: startsWith(github.ref_name, 'releases/') != true
if: ${{ (startsWith(github.ref_name, 'releases/') != true && inputs.env == null) || inputs.env == 'dev' }}
secrets: inherit
with:
environment: dev
Expand All @@ -27,7 +35,7 @@ jobs:
release_uat:
uses: ./.github/workflows/call_release_ms.yml
name: '[UAT] OnBoarding ms Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ (startsWith(github.ref_name, 'releases/') == true && inputs.env == null) || inputs.env == 'uat' }}
secrets: inherit
with:
environment: uat
Expand All @@ -36,7 +44,7 @@ jobs:
release_prod:
uses: ./.github/workflows/call_release_ms.yml
name: '[Prod] OnBoarding ms Release'
if: startsWith(github.ref_name, 'releases/')
if: ${{ inputs.env == 'prod' }}
secrets: inherit
with:
environment: prod
Expand Down

0 comments on commit 4dc30bb

Please sign in to comment.