diff --git a/.github/workflows/production-pipeline.yml b/.github/workflows/production-pipeline.yml index 918c374..3ff9ddd 100644 --- a/.github/workflows/production-pipeline.yml +++ b/.github/workflows/production-pipeline.yml @@ -29,6 +29,7 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - run: | + cp swagger.prod .env docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi:${{ github.sha }} -f ./docker/Dockerfile . docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi:latest diff --git a/.github/workflows/qa-pipeline.yml b/.github/workflows/qa-pipeline.yml index 785d809..0065ce4 100644 --- a/.github/workflows/qa-pipeline.yml +++ b/.github/workflows/qa-pipeline.yml @@ -34,6 +34,7 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} - run: | + cp cp swagger.qa .env docker build -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi-qa:${{ github.sha }} -f ./docker/Dockerfile . docker tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi-qa:${{ github.sha }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/whatnowapi-qa:latest diff --git a/config/l5-swagger.php b/config/l5-swagger.php index 6316ecb..bc5f36b 100644 --- a/config/l5-swagger.php +++ b/config/l5-swagger.php @@ -252,7 +252,7 @@ * Constants which can be used in annotations */ 'constants' => [ - 'L5_SWAGGER_CONST_HOST' => env('APP_URL', 'https://api-preparemessages-stage.ifrc.org') . '/v2', + 'L5_SWAGGER_CONST_HOST' => env('SWAGGER_URL', null) . '/v2', ], ], ]; diff --git a/swagger.prod b/swagger.prod new file mode 100644 index 0000000..c8caa5b --- /dev/null +++ b/swagger.prod @@ -0,0 +1 @@ +SWAGGER_URL=https://preparemessages.ifrc.org diff --git a/swagger.qa b/swagger.qa new file mode 100644 index 0000000..fa2519c --- /dev/null +++ b/swagger.qa @@ -0,0 +1 @@ +SWAGGER_URL=https://preparemessages-stage.ifrc.org