Skip to content

Commit 32e7eba

Browse files
committed
fix: 빌드타임 워크플로우 개선2
1 parent ab17d65 commit 32e7eba

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/_build-image.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ on:
2626
default: false
2727
secrets:
2828
BUILD_ENV:
29-
description: 'Optional build-time env file contents, mounted as secret id=build_env'
30-
required: false
29+
description: 'Build-time env file contents, mounted as secret id=build_env (pass empty string if unused)'
30+
required: true
3131

3232
jobs:
3333
build:
@@ -60,7 +60,6 @@ jobs:
6060
type=raw,value=latest,enable={{is_default_branch}}
6161
6262
- name: Write build env file
63-
if: ${{ secrets.BUILD_ENV != '' }}
6463
run: |
6564
printf '%s' "${{ secrets.BUILD_ENV }}" > build.env
6665
chmod 600 build.env
@@ -77,7 +76,7 @@ jobs:
7776
cache-from: ${{ inputs.no_cache && '' || format('type=gha,scope={0}', inputs.component) }}
7877
cache-to: type=gha,mode=max,scope=${{ inputs.component }}
7978
secret-files: |
80-
${{ secrets.BUILD_ENV != '' && 'build_env=build.env' || '' }}
79+
build_env=build.env
8180
8281
- name: Clean up env file
8382
if: always()

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
image: ${{ github.repository_owner }}/greedyreader-be
7070
version: ${{ github.run_number }}
7171
no_cache: ${{ inputs.no_cache || false }}
72+
secrets:
73+
BUILD_ENV: ${{ secrets.BACKEND_BUILD_ENV }}
7274

7375
deploy:
7476
needs: [resolve, build-frontend, build-backend]

0 commit comments

Comments
 (0)