Skip to content

Commit

Permalink
Merge pull request #312 from LerianStudio/fix/MIDAZ-311
Browse files Browse the repository at this point in the history
Fix/midaz 311
  • Loading branch information
MartinezAvellan authored Nov 26, 2024
2 parents ef3bb62 + e92b05d commit 1b5b96f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/update-env-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion components/ledger/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ENV_NAME=production

# APP
VERSION=1.21.0
VERSION=v1.29.0
SERVER_PORT=3000
SERVER_ADDRESS=:${SERVER_PORT}

Expand Down
2 changes: 1 addition & 1 deletion components/transaction/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 1b5b96f

Please sign in to comment.