diff --git a/.github/workflows/backend-build.yml b/.github/workflows/backend-build.yml index 0374b9a1..61d09c82 100644 --- a/.github/workflows/backend-build.yml +++ b/.github/workflows/backend-build.yml @@ -68,7 +68,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/backend/Dockerfile + file: ${{ github.ref == 'refs/heads/main' && 'docker-prod/backend/Dockerfile' || 'docker-pre-prod/backend/Dockerfile' }} target: runtime push: true tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'latest' || 'pre-prod' }} @@ -78,7 +78,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/backend/Dockerfile + file: ${{ github.ref == 'refs/heads/main' && 'docker-prod/backend/Dockerfile' || 'docker-pre-prod/backend/Dockerfile' }} target: waf push: true tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'waf' || 'waf-pre-prod' }} diff --git a/.github/workflows/frontend-admin-build-local.yml b/.github/workflows/frontend-admin-build-local.yml index 1dfffeed..7bde23ff 100644 --- a/.github/workflows/frontend-admin-build-local.yml +++ b/.github/workflows/frontend-admin-build-local.yml @@ -61,7 +61,7 @@ jobs: echo "profile=production" >> $GITHUB_OUTPUT echo "channel=production-admin" >> $GITHUB_OUTPUT echo "api_url=${{ secrets.PROD_API_URL }}" >> $GITHUB_OUTPUT - echo "ota_api_url=https://mln-uber.club" >> $GITHUB_OUTPUT + echo "ota_api_url=${{ secrets.PROD_API_URL }}" >> $GITHUB_OUTPUT echo "xavia_url=https://ota-prod.uber-stup.club" >> $GITHUB_OUTPUT echo "xavia_key=${{ secrets.XAVIA_KEY_ADMIN_PROD }}" >> $GITHUB_OUTPUT echo "apk_name=admin-panel-production-$(date +%Y%m%d-%H%M).apk" >> $GITHUB_OUTPUT @@ -70,7 +70,7 @@ jobs: echo "profile=pre-prod" >> $GITHUB_OUTPUT echo "channel=pre-prod-admin" >> $GITHUB_OUTPUT echo "api_url=${{ secrets.PREPROD_API_URL }}" >> $GITHUB_OUTPUT - echo "ota_api_url=https://5.181.0.112.nip.io" >> $GITHUB_OUTPUT + echo "ota_api_url=${{ secrets.PREPROD_API_URL }}" >> $GITHUB_OUTPUT echo "xavia_url=https://ota-preprod.uber-stup.club" >> $GITHUB_OUTPUT echo "xavia_key=${{ secrets.XAVIA_KEY_ADMIN_PREPROD }}" >> $GITHUB_OUTPUT echo "apk_name=admin-panel-pre-prod-$(date +%Y%m%d-%H%M).apk" >> $GITHUB_OUTPUT diff --git a/.github/workflows/frontend-web-build.yml b/.github/workflows/frontend-web-build.yml index 0d7cbaef..2d2ba2b1 100644 --- a/.github/workflows/frontend-web-build.yml +++ b/.github/workflows/frontend-web-build.yml @@ -57,7 +57,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/frontend/Dockerfile + file: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'docker-prod/frontend/Dockerfile' || 'docker-pre-prod/frontend/Dockerfile' }} push: true tags: xor1234/frontend-mln:${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'latest' || 'pre-prod' }} build-args: |