Skip to content

Commit

Permalink
Fixed GitHub actions docker build args not working (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corgam authored May 28, 2024
2 parents 6bbce90 + 2138714 commit 95b49cd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# The environment stage set for individual services
ENVIRONMENT_STAGE=development
# The tag used for pulling the docker images
DOCKER_COMPOSE_IMAGES_TAG=latest
DOCKER_COMPOSE_IMAGES_TAG=test

### HOSTS & PORTS ###

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build-and-publish-frontend:
name: Build and publish the Frontend image
name: Build and publish - Frontend
runs-on: ubuntu-latest

steps:
Expand All @@ -37,6 +37,7 @@ jobs:
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}
Expand All @@ -49,7 +50,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-api-gateway:
name: Build and publish - API Gateway
Expand Down Expand Up @@ -77,6 +78,7 @@ jobs:
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}
Expand All @@ -89,7 +91,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-datapipeline:
name: Build and publish - Data Pipeline
Expand Down Expand Up @@ -117,6 +119,7 @@ jobs:
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}
Expand All @@ -129,7 +132,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-sql-database:
name: Build and publish - SQL Database
Expand Down Expand Up @@ -157,6 +160,7 @@ jobs:
type=ref,event=tag
type=sha
type=raw,value=${{ env.STAGE }}
latest
labels: |
stage=${{ env.STAGE }}
Expand All @@ -169,7 +173,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
deploy-prod-env:
needs:
Expand All @@ -179,7 +183,7 @@ jobs:
build-and-publish-backend-datapipeline,
build-and-publish-backend-sql-database,
]
name: Deploy Docker Images in the Production Environment
name: Deploy - Production Environment
runs-on: ubuntu-latest

steps:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build-and-publish-frontend:
name: Build and publish the Frontend image
name: Build and publish - Frontend
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-api-gateway:
name: Build and publish - API Gateway
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-datapipeline:
name: Build and publish - Data Pipeline
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
build-and-publish-backend-sql-database:
name: Build and publish - SQL Database
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
STAGE: ${{ env.STAGE }}
STAGE=${{ env.STAGE }}
deploy-test-env:
needs:
Expand All @@ -179,7 +179,7 @@ jobs:
build-and-publish-backend-datapipeline,
build-and-publish-backend-sql-database,
]
name: Deploy Docker Images in the Test Environment
name: Deploy - Test Environment
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 95b49cd

Please sign in to comment.