Skip to content

Commit

Permalink
Fix action build
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhoan-axonivy committed Jul 12, 2024
1 parent 168bdcf commit 24be61d
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,21 @@ jobs:
runs-on: self-hosted

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Update configuration
env:
ENV_FILE: './marketplace-build/.env'
MONGODB_HOST: ${{ secrets.MONGODB_HOST }}
MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ROOT_USERNAME: ${{ secrets.MONGODB_ROOT_USERNAME }}
ROOT_PASSWORD: ${{ secrets.MONGODB_ROOT_PASSWORD }}
SERVICE_USERNAME: ${{ secrets.SERVICE_USERNAME }}
SERVICE_PASSWORD: ${{ secrets.SERVICE_PASSWORD }}
run: |
sed -i "s/^MONGODB_INITDB_ROOT_USERNAME=.*$/spring.data.mongodb.host=$MONGODB_HOST/" $ENV_FILE
sed -i "s/^MONGODB_INITDB_ROOT_PASSWORD=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_HOST=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_DATABASE=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_USER=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_PASSWORD=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^MONGODB_INITDB_ROOT_USERNAME=.*$/MONGODB_INITDB_ROOT_USERNAME=$ROOT_USERNAME/" $ENV_FILE
sed -i "s/^MONGODB_INITDB_ROOT_PASSWORD=.*$/MONGODB_INITDB_ROOT_PASSWORD=$ROOT_PASSWORD/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_HOST=.*$/SERVICE_MONGODB_HOST=$MONGODB_HOST/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_DATABASE=.*$/SERVICE_MONGODB_DATABASE=$MONGODB_DATABASE/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_USER=.*$/SERVICE_MONGODB_USER=$SERVICE_USERNAME/" $ENV_FILE
sed -i "s/^SERVICE_MONGODB_PASSWORD=.*$/SERVICE_MONGODB_PASSWORD=$SERVICE_PASSWORD/" $ENV_FILE
- name: Build and push Docker images
working-directory: ./marketplace-build
Expand Down

0 comments on commit 24be61d

Please sign in to comment.