Skip to content

Commit

Permalink
use .env file to supply terafoundation_kafka_connector and image vers…
Browse files Browse the repository at this point in the history
…ion in workflows
  • Loading branch information
busma13 committed Feb 6, 2025
1 parent dcbce40 commit 264447a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file stores variables used by build.yml and release.yml as build-args
# If IMAGE_VERSION is updated then a new release
# will be created with that tag on merge to master

TERAFOUNDATION_KAFKA_CONNECTOR_VERSION=1.2.1
IMAGE_VERSION=1.2.2
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
name: Get timestamp for docker build
id: docker_time_stamp
run: echo "BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")" >> $GITHUB_ENV
-
name: Get versions from .env file using Dotenv Action
id: dotenv
uses: falti/dotenv-action@v1.1.4
with:
log-variables: true
keys-case: bypass
-
name: Build
uses: docker/build-push-action@v6
Expand All @@ -57,6 +64,8 @@ jobs:
"NODE_VERSION=${{ matrix.version }}"
"GITHUB_SHA=${{ github.sha }}"
"BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}"
"TERAFOUNDATION_KAFKA_CONNECTOR_VERSION=${{ steps.dotenv.outputs.TERAFOUNDATION_KAFKA_CONNECTOR_VERSION }}"
"IMAGE_VERSION=${{ steps.dotenv.outputs.IMAGE_VERSION }}"
provenance: false
sbom: false
pull: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
name: Get timestamp for docker build
id: docker_time_stamp
run: echo "BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")" >> $GITHUB_ENV
-
name: Get versions from .env file using Dotenv Action
id: dotenv
uses: falti/dotenv-action@v1.1.4
with:
log-variables: true
keys-case: bypass
-
name: Build
uses: docker/build-push-action@v6
Expand All @@ -58,6 +65,8 @@ jobs:
"NODE_VERSION=${{ matrix.version }}"
"GITHUB_SHA=${{ github.sha }}"
"BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }}"
"TERAFOUNDATION_KAFKA_CONNECTOR_VERSION=${{ steps.dotenv.outputs.TERAFOUNDATION_KAFKA_CONNECTOR_VERSION }}"
"IMAGE_VERSION=${{ steps.dotenv.outputs.IMAGE_VERSION }}"
provenance: false
sbom: false
pull: true
Expand Down

0 comments on commit 264447a

Please sign in to comment.