diff --git a/.env b/.env new file mode 100644 index 0000000..7c78d61 --- /dev/null +++ b/.env @@ -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 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f15fc70..b08bee7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db42d19..12b52be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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