Skip to content

Commit

Permalink
Add extra step for composition of env variable
Browse files Browse the repository at this point in the history
Composed environment variables cannot reference each other in the `env`-section. Therefore, use an extra step for composed env variables and write them to `$GITHUB_ENV`.
  • Loading branch information
qa-andreas-theuerkauf authored Aug 15, 2024
1 parent ec23686 commit f17e8f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ env:
PROJECT_BASE_URL: https://qawareblog-2ixogl4y4q-ey.a.run.app/
DOCKER_GAR_NAME: qawareblog-docker
SERVICE_NAME: qawareblog
DOCKER_GAR_URL: "${{ env.RUN_REGION }}-docker.pkg.dev"
DOCKER_GAR_PATH: "${{ env.DOCKER_GAR_URL }}/{{ env.PROJECT_ID }}/{{ env.DOCKER_GAR_NAME}}"
DOCKER_IMAGE_PATH: "${{ env.DOCKER_GAR_PATH }}/{{ env.SERVICE_NAME }}:{{ github.sha }}"

jobs:
deploy:
Expand All @@ -21,6 +18,11 @@ jobs:
with:
submodules: true

- name: Setup composed environment variables
run: |
echo "DOCKER_IMAGE_PATH=${RUN_REGION}-docker.pkg.dev/${PROJECT_ID}/{$DOCKER_GAR_NAME}
/{$SERVICE_NAME}:${GITHUB_SHA}" >> $GITHUB_ENV
- name: Setup hugo
uses: peaceiris/[email protected]
with:
Expand Down

0 comments on commit f17e8f2

Please sign in to comment.