diff --git a/.github/workflows/api-deploy-staging.yml b/.github/workflows/api-deploy-staging.yml index e75f69e..02f8a9d 100644 --- a/.github/workflows/api-deploy-staging.yml +++ b/.github/workflows/api-deploy-staging.yml @@ -10,11 +10,8 @@ jobs: runs-on: ubuntu-latest environment: staging outputs: - api_service_name: ${{ vars.API_SERVICE_NAME }} - api_service_path: ${{ vars.API_SERVICE_PATH }} - steps: - - run: | - echo "Exposing ENV vars to reusable workflows." + service_name: ${{ vars.API_SERVICE_NAME }} + service_path: ${{ vars.API_SERVICE_PATH }} deploy: needs: fetch-vars @@ -23,5 +20,6 @@ jobs: with: project-name: Api dotnet-version: '6.0.x' - service-name: ${{ needs.fetch-vars.outputs.api_service_name }} - service-path: ${{ needs.fetch-vars.outputs.api_service_path }} + service-name: ${{ needs.fetch-vars.outputs.service_name }} + service-path: ${{ needs.fetch-vars.outputs.service_path }} + environment: staging diff --git a/.github/workflows/deploy-dotnet-service-ec2.yml b/.github/workflows/deploy-dotnet-service-ec2.yml index 1ad0d73..bc18e19 100644 --- a/.github/workflows/deploy-dotnet-service-ec2.yml +++ b/.github/workflows/deploy-dotnet-service-ec2.yml @@ -15,12 +15,15 @@ on: service-path: required: true type: string + environment: + required: true + type: string jobs: deploy: if: github.repository_owner == 'Yorubaname' runs-on: ubuntu-latest - environment: staging + environment: ${{ inputs.environment }} steps: - name: Checkout code diff --git a/.github/workflows/website-deploy-staging.yml b/.github/workflows/website-deploy-staging.yml index 6515c8d..8ed51b6 100644 --- a/.github/workflows/website-deploy-staging.yml +++ b/.github/workflows/website-deploy-staging.yml @@ -10,14 +10,8 @@ jobs: runs-on: ubuntu-latest environment: staging outputs: - website_service_name: ${{ steps.set-vars.outputs.website_service_name }} - website_service_path: ${{ steps.set-vars.outputs.website_service_path }} - steps: - - name: Set Environment Variables - id: set-vars - run: | - echo "website_service_name=${{ vars.WEBSITE_SERVICE_NAME }}" >> $GITHUB_OUTPUT - echo "website_service_path=${{ vars.WEBSITE_SERVICE_PATH }}" >> $GITHUB_OUTPUT + service_name: ${{ vars.WEBSITE_SERVICE_NAME }} + service_path: ${{ vars.WEBSITE_SERVICE_PATH }} deploy: needs: fetch-vars @@ -26,5 +20,6 @@ jobs: with: project-name: Website dotnet-version: '8.0.x' - service-name: ${{ needs.fetch-vars.outputs.website_service_name }} - service-path: ${{ needs.fetch-vars.outputs.website_service_path }} + service-name: ${{ needs.fetch-vars.outputs.service_name }} + service-path: ${{ needs.fetch-vars.outputs.service_path }} + environment: staging