Skip to content

Commit e58e989

Browse files
mishraompCopilot
andauthored
fix: GitHub release prod (#15)
Co-authored-by: Copilot <[email protected]>
1 parent 3e4fd0b commit e58e989

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

.github/workflows/.deploy_stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
build-ui:
8080
name: Build And upload UI to s3 ${{ inputs.environment_name }}
8181
environment: ${{ inputs.environment_name }}
82-
if: ${{ inputs.command == 'apply' }}
82+
if: (inputs.command == 'apply')
8383
needs: [deploy-api, deploy-cloudfront]
8484
runs-on: ubuntu-24.04
8585
steps:

.github/workflows/.deployer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
# Run terraform
9292
terragrunt run-all ${{inputs.command}} --terragrunt-non-interactive
9393
- name: Terragrunt API Outputs
94-
if: ${{ inputs.working_directory == 'api' && inputs.command == 'apply' }}
94+
if: (inputs.working_directory == 'api' && inputs.command == 'apply')
9595
working-directory: terraform/${{ inputs.working_directory }}/${{ inputs.environment_name }}
9696
id: tg-outputs
9797
env:
@@ -107,7 +107,7 @@ jobs:
107107
108108
echo "API_GW_URL=$(jq -r .apigw_url.value outputs.json)" >> $GITHUB_OUTPUT
109109
- name: Terragrunt Frontend Outputs
110-
if: ${{ inputs.working_directory == 'frontend' && inputs.command == 'apply' }}
110+
if: (inputs.working_directory == 'frontend' && inputs.command == 'apply')
111111
working-directory: terraform/${{ inputs.working_directory }}/${{ inputs.environment_name }}
112112
id: tg-outputs-frontend
113113
env:

.github/workflows/.tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
backend-tests:
1515
name: Backend Tests
16-
if: ${{ ! github.event.pull_request.draft }}
16+
if: (! github.event.pull_request.draft )
1717
runs-on: ubuntu-24.04
1818
timeout-minutes: 5
1919
steps:
@@ -63,7 +63,7 @@ jobs:
6363
triggers: ('frontend/')
6464
trivy:
6565
name: Trivy Security Scan
66-
if: ${{ ! github.event.pull_request.draft }}
66+
if: (! github.event.pull_request.draft )
6767
runs-on: ubuntu-24.04
6868
permissions:
6969
contents: read # This is required for actions/checkout

.github/workflows/pause-resources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: ./.github/workflows/.stack-prefix.yml
3434
pause-resources-dev:
3535
name: Pause Resources Dev
36-
if: (${{inputs.app_env == 'dev' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
36+
if: (inputs.app_env == 'dev' || inputs.app_env == 'all' || github.event_name == 'schedule')
3737
needs: [stack-prefix]
3838
runs-on: ubuntu-24.04
3939
steps:
@@ -52,7 +52,7 @@ jobs:
5252
5353
pause-resources-test:
5454
name: Pause Resources Test
55-
if: (${{inputs.app_env == 'test' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
55+
if: (inputs.app_env == 'test' || inputs.app_env == 'all' || github.event_name == 'schedule')
5656
environment: test
5757
needs: [stack-prefix]
5858
runs-on: ubuntu-24.04
@@ -72,7 +72,7 @@ jobs:
7272
./.github/scripts/pause.sh test ${{ needs.stack-prefix.outputs.stack_prefix }}
7373
pause-resources-prod:
7474
name: Pause Resources PROD
75-
if: (${{inputs.app_env == 'prod' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
75+
if: (inputs.app_env == 'prod' || inputs.app_env == 'all' || github.event_name == 'schedule')
7676
environment: prod
7777
needs: [stack-prefix]
7878
runs-on: ubuntu-24.04

.github/workflows/prune-env.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ permissions:
2424
jobs:
2525
destroy-dev:
2626
name: Destroy Stack Dev
27-
if: ${{ github.event.inputs.app_env == 'dev' }}
27+
if: ( github.event.inputs.app_env == 'dev' )
2828
uses: ./.github/workflows/.destroy_stack.yml
2929
secrets: inherit
3030
with:
3131
environment_name: ${{ github.event.inputs.environment_name }}
3232
app_env: ${{ github.event.inputs.app_env }}
3333
destroy-test:
3434
name: Destroy Stack Test
35-
if: ${{ github.event.inputs.app_env == 'test' }}
35+
if: ( github.event.inputs.app_env == 'test' )
3636
uses: ./.github/workflows/.destroy_stack.yml
3737
secrets: inherit
3838
with:

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
default: 'test'
1111
type: string
1212
concurrency:
13-
group: main
13+
group: prod
1414
cancel-in-progress: false
1515
# This concurrency group ensures that only one workflow runs at a time for the main branch.
1616
permissions:
@@ -46,8 +46,7 @@ jobs:
4646
run: |
4747
echo "getting tag from release which was done manually in github"
4848
# remove all spaces and new lines from the tag name and make it lowercase.
49-
# Assign the computed tag value to a shell variable
50-
tag=$(echo "${{ github.event.release.tag_name }}" | tr -d '[:space:]' | tr '[:upper:]' '[:lower:]')
49+
tag=$(echo "${{ github.event.release.tag_name }}" | tr -d ' \n\r\t' | tr '[:upper:]' '[:lower:]')
5150
echo "tag=$tag" >> $GITHUB_OUTPUT
5251
# Compute version as tag without the leading 'v'
5352
version=$(echo "$tag" | sed 's/^v//')
@@ -69,7 +68,8 @@ jobs:
6968
target: ${{inputs.containers_tag}} # this is the tag of the containers to deploy, defaults to test
7069
tags: |
7170
prod
72-
${{ needs.vars.outputs.version}}
71+
${{ needs.vars.outputs.version }}
72+
${{ needs.vars.outputs.tag }}
7373
resume-resources:
7474
name: Resume Resources # This job resumes resources for the merged PR which is needed if the resources were paused.
7575
needs: [vars]
@@ -95,7 +95,7 @@ jobs:
9595
steps:
9696
- name: Create Release
9797
uses: softprops/action-gh-release@v2
98-
if: ${{ needs.vars.outputs.tag != ''}}
98+
if: (needs.vars.outputs.tag != '')
9999
continue-on-error: true
100100
env:
101101
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/resume-resources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
name: Stack Prefix
3333
uses: ./.github/workflows/.stack-prefix.yml
3434
resume-resources-dev:
35-
if: (${{inputs.app_env == 'dev' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
35+
if: (inputs.app_env == 'dev' || inputs.app_env == 'all' || github.event_name == 'schedule')
3636
name: Resume Resources Dev
3737
needs: [stack-prefix]
3838
runs-on: ubuntu-24.04
@@ -52,7 +52,7 @@ jobs:
5252
./.github/scripts/resume.sh dev ${{ needs.stack-prefix.outputs.stack_prefix }}
5353
resume-resources-test:
5454
name: Resume Resources Test
55-
if: (${{inputs.app_env == 'test' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
55+
if: (inputs.app_env == 'test' || inputs.app_env == 'all' || github.event_name == 'schedule')
5656
environment: test
5757
needs: [stack-prefix]
5858
runs-on: ubuntu-24.04
@@ -72,7 +72,7 @@ jobs:
7272
./.github/scripts/resume.sh test ${{ needs.stack-prefix.outputs.stack_prefix }}
7373
resume-resources-prod:
7474
name: Resume Resources Prod
75-
if: (${{inputs.app_env == 'prod' || inputs.app_env == 'all'}} || github.event_name == 'schedule')
75+
if: (inputs.app_env == 'prod' || inputs.app_env == 'all' || github.event_name == 'schedule')
7676
environment: prod
7777
needs: [stack-prefix]
7878
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)