Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVOPS-265] Add environmentCharts input #57

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/bump-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
required: true
type: string
description: Type of release
environmentCharts:
required: false
type: boolean
description: Set to true if the repository has separate Helm chart directories for each environment
default: false
secrets:
PAT_ACTION_CI:
required: false
Expand All @@ -24,12 +29,21 @@ jobs:
uses: thebritican/fetch-latest-release@v2.0.0

- name: Get Chart.yaml appVersion
if: inputs.environmentCharts == false
id: chartyaml
uses: rmeneely/get-yaml-value@v1
with:
infile: deployments/charts/Chart.yaml
varlist: appVersion

- name: Get Environment Chart.yaml appVersion
if: inputs.environmentCharts == true
id: environmentchartyaml
uses: rmeneely/get-yaml-value@v1
with:
infile: deployments/production-charts/Chart.yaml
varlist: appVersion

- name: Check if package.json exists
id: packagejsonfile
uses: andstor/file-existence-action@v2
Expand All @@ -48,7 +62,7 @@ jobs:
shell: pwsh
run: |
[Version]$a = "${{ steps.packagejson.outputs.prop || '0.0.0' }}"
[Version]$b = "${{ steps.chartyaml.outputs.values || '0.0.0' }}"
[Version]$b = "${{ steps.environmentchartyaml.outputs.values || steps.chartyaml.outputs.values || '0.0.0' }}"
[Version]$c = "${{ steps.latestrelease.outputs.tag_name || '0.0.0' }}"

$versions = [array]($a,$b,$c)
Expand Down
Loading