Skip to content

Commit

Permalink
test passing ddocker build args
Browse files Browse the repository at this point in the history
  • Loading branch information
elrayle committed Jul 11, 2024
1 parent 8f93216 commit b1a13fa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/app-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will build a docker image, push it to ghcr.io, and deploy it to an Azure WebApp.
# v1.1.1 - This tag coordinates the other reusable parts of this workflow.
# v1.1.1-rc13 - This tag coordinates the other reusable parts of this workflow.
# * app-build-docker-image.yml
# * app-deploy-to-azure.yml
# * app-is-deployable.yml
Expand Down Expand Up @@ -45,6 +45,11 @@ on:
description: 'postfix to apply to the base name for a secondary deploy site (e.g. -prod-europe, do not specify if no secondary site)'
type: string
default: ''
docker-build-args:
description: 'optionally pass in build args to the Docker build command (e.g. "MY_VAR=my_value")'
required: false
type: string


jobs:
determine-trigger:
Expand Down Expand Up @@ -74,7 +79,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v1.1.1'
ref: 'v1.1.1-rc13'
path: 'operations'
- name: Get version from package-lock.json
id: get_version
Expand All @@ -92,19 +97,20 @@ jobs:
build-and-publish-image:
name: Build and publish Docker image
needs: get-version
uses: clearlydefined/operations/.github/workflows/[email protected]
uses: clearlydefined/operations/.github/workflows/[email protected]-rc13
secrets:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
PRODUCTION_DEPLOYERS: ${{ secrets.PRODUCTION_DEPLOYERS }}
with:
deploy-env: ${{ inputs.deploy-env }}
application-type: ${{ inputs.application-type }}
image-tag: ${{ needs.get-version.outputs.version }}
build-args: ${{ inputs.docker-build-args }}

deploy-primary-app-to-azure:
name: Deploy to primary Azure app
needs: [get-version, build-and-publish-image]
uses: clearlydefined/operations/.github/workflows/[email protected]
uses: clearlydefined/operations/.github/workflows/[email protected]-rc13
secrets:
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
Expand All @@ -120,7 +126,7 @@ jobs:
name: Deploy to secondary Azure app
if: ${{ inputs.secondary-azure-app-name-postfix != '' }}
needs: [get-version, build-and-publish-image]
uses: clearlydefined/operations/.github/workflows/[email protected]
uses: clearlydefined/operations/.github/workflows/[email protected]-rc13
secrets:
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_SECONDARY_WEBAPP_PUBLISH_PROFILE }}
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/app-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ on:
description: 'the tag to use for the image (e.g. prod: v1.2.0, dev: v1.2.0+dev:1D3F567890)'
required: true
type: string
build-args:
description: 'optionally pass in build args to the Docker build command (e.g. "MY_VAR=my_value")'
required: false
type: string

outputs:
docker-image-name-with-tag:
value: ${{ jobs.determine-image-name.outputs.docker-image-name-with-tag }}

jobs:
check-deployable:
uses: clearlydefined/operations/.github/workflows/[email protected]
uses: clearlydefined/operations/.github/workflows/[email protected]-rc13
with:
deploy-env: ${{ inputs.deploy-env }}
secrets:
Expand All @@ -48,7 +52,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v1.1.1'
ref: 'v1.1.1-rc13'
path: 'operations'
- name: Determine Docker Image Name
id: determine_image_name
Expand Down Expand Up @@ -86,3 +90,4 @@ jobs:
labels: |
env=${{ inputs.deploy-env }}
type=${{ inputs.application-type }}
build-args: ${{ inputs.build_args}}
2 changes: 1 addition & 1 deletion .github/workflows/app-deploy-to-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on:

jobs:
check-deployable:
uses: clearlydefined/operations/.github/workflows/[email protected]
uses: clearlydefined/operations/.github/workflows/[email protected]-rc13
with:
deploy-env: ${{ inputs.deploy-env }}
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/app-is-deployable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v1.1.1'
ref: 'v1.1.1-rc13'
path: 'operations'
- id: confirm-dev
shell: bash
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/[email protected]
with:
repository: 'clearlydefined/operations'
ref: 'v1.1.1'
ref: 'v1.1.1-rc13'
path: 'operations'

- name: Get organization ID
Expand Down

0 comments on commit b1a13fa

Please sign in to comment.