Skip to content

Commit

Permalink
Attempt to fix empty vars issue. (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zifah authored Aug 7, 2024
1 parent b09ec01 commit 09c9f5e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/api-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,25 @@ on:
- main

jobs:
fetch-vars:
runs-on: ubuntu-latest
environment: staging
outputs:
api_service_name: ${{ steps.set-vars.outputs.api_service_name }}
api_service_path: ${{ steps.set-vars.outputs.api_service_path }}
steps:
- name: Set Environment Variables
id: set-vars
run: |
echo "::set-output name=api_service_name::${{ vars.API_SERVICE_NAME }}"
echo "::set-output name=api_service_path::${{ vars.API_SERVICE_PATH }}"
deploy:
needs: fetch-vars
uses: ./.github/workflows/deploy-dotnet-service-ec2.yml
secrets: inherit
with:
project-name: Api
dotnet-version: '6.0.x'
service-name: ${{ vars.API_SERVICE_NAME }}
service-path: ${{ vars.API_SERVICE_PATH }}
service-name: ${{ needs.fetch-vars.outputs.api_service_name }}
service-path: ${{ needs.fetch-vars.outputs.api_service_path }}
27 changes: 19 additions & 8 deletions .github/workflows/website-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@ on:
- main

jobs:
deploy:
fetch-vars:
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: Call reusable workflow
uses: ./.github/workflows/deploy-dotnet-service-ec2.yml
with:
project-name: Website
dotnet-version: '8.0.x'
service-name: ${{ vars.WEBSITE_SERVICE_NAME }}
service-path: ${{ vars.WEBSITE_SERVICE_PATH }}
- name: Set Environment Variables
id: set-vars
run: |
echo "::set-output name=website_service_name::${{ vars.WEBSITE_SERVICE_NAME }}"
echo "::set-output name=website_service_path::${{ vars.WEBSITE_SERVICE_PATH }}"
deploy:
needs: fetch-vars
uses: ./.github/workflows/deploy-dotnet-service-ec2.yml
secrets: inherit
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 }}

0 comments on commit 09c9f5e

Please sign in to comment.