diff --git a/.github/workflows/update-env-version.yml b/.github/workflows/update-env-version.yml index 18763d1f..ddbf1b0f 100644 --- a/.github/workflows/update-env-version.yml +++ b/.github/workflows/update-env-version.yml @@ -3,9 +3,12 @@ name: Update Envs Version With TAG Release on: pull_request: branches: - - main + - develop types: - opened + - edited + - synchronize + - reopened permissions: id-token: write @@ -53,19 +56,32 @@ jobs: echo "Formatted release: $FORMATTED_RELEASE" echo "::set-output name=tag::$FORMATTED_RELEASE" + - name: Fetch Env Release + id: env_release + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + VERSION=$(grep '^VERSION=' ./components/ledger/.env.example | cut -d '=' -f2) + echo "LEDGER version: $VERSION" + echo "::set-output name=version::$VERSION" + - name: Update LEDGER Env + if: steps.latest_release.outputs.tag != steps.env_release.outputs.version run: | sed -i "s/^VERSION=.*/VERSION=${{ steps.latest_release.outputs.tag }}/" ./components/ledger/.env.example - name: Update TRANSACTION Env + if: steps.latest_release.outputs.tag != steps.env_release.outputs.version run: | sed -i "s/^VERSION=.*/VERSION=${{ steps.latest_release.outputs.tag }}/" ./components/transaction/.env.example - name: Git Diff + if: steps.latest_release.outputs.tag != steps.env_release.outputs.version run: | git diff - name: Commit Changes + if: steps.latest_release.outputs.tag != steps.env_release.outputs.version env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/components/ledger/.env.example b/components/ledger/.env.example index 96a7edd6..06a3159b 100644 --- a/components/ledger/.env.example +++ b/components/ledger/.env.example @@ -2,7 +2,7 @@ # ENV_NAME=production # APP -VERSION=1.21.0 +VERSION=v1.29.0 SERVER_PORT=3000 SERVER_ADDRESS=:${SERVER_PORT} diff --git a/components/transaction/.env.example b/components/transaction/.env.example index 1f7db90d..8773d280 100644 --- a/components/transaction/.env.example +++ b/components/transaction/.env.example @@ -2,7 +2,7 @@ # ENV_NAME=production # APP -VERSION=1.21.0 +VERSION=v1.29.0 APP_CONTEXT=/transaction/v1 SERVER_PORT=3002 SERVER_ADDRESS=:${SERVER_PORT}