5454 steps :
5555 - uses : actions/checkout@v4
5656
57- # 환경 변수
58- # 도플러 변경 예정
59- # - name: application-secret 추가
60- # env:
61- # ACTIONS_STEP_DEBUG: true
62- # APPLICATION_SECRET: ${{ secrets.APPLICATION_SECRET }}
63- # run: echo "$APPLICATION_SECRET" > src/main/resources/application-secret.yml
64-
6557 - name : Docker Buildx 설치
6658 uses : docker/setup-buildx-action@v2
6759
8779 with :
8880 context : ./backend
8981 push : true
90- build-args : |
91- DOPPLER_TOKEN=${{ secrets.DOPPLER_TOKEN }}
9282 cache-from : type=registry,ref=ghcr.io/${{ steps.export_owner.outputs.owner_lc }}/${{ steps.export_image.outputs.image_name }}:cache
9383 cache-to : type=registry,ref=ghcr.io/${{ steps.export_owner.outputs.owner_lc }}/${{ steps.export_image.outputs.image_name }}:cache,mode=max
9484 tags : |
@@ -124,10 +114,28 @@ jobs:
124114 working-directory : /
125115 comment : Deploy
126116 command : |
117+ if ! command -v doppler &> /dev/null
118+ then
119+ echo "Doppler CLI not found. Installing now..."
120+ # (Debian/Ubuntu 기준 설치 명령어)
121+ curl -sLf --retry 3 --tlsv1.2 --proto "=https" '...' | sudo gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg && \
122+ echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list && \
123+ sudo apt-get update && \
124+ sudo apt-get -y install doppler
125+ else
126+ echo "Doppler CLI is already installed."
127+ fi && \
128+
129+ export DOPPLER_TOKEN="${{ secrets.DOPPLER_TOKEN }}" && \
127130 docker pull ghcr.io/${{ needs.buildImageAndPush.outputs.owner_lc }}/${{ needs.buildImageAndPush.outputs.image_name }}:latest && \
131+
128132 docker stop app1 2>/dev/null || true && \
129133 docker rm app1 2>/dev/null || true && \
134+
135+ export DOPPLER_TOKEN="${{ secrets.DOPPLER_TOKEN }}" && \
136+ doppler run --project waitfair --config prd -- \
130137 docker run -d --name app1 --network common -p 8080:8080 \
131- -e DOPPLER_TOKEN=${{ secrets.DOPPLER_TOKEN }} \
132138 ghcr.io/${{ needs.buildImageAndPush.outputs.owner_lc }}/${{ needs.buildImageAndPush.outputs.image_name }}:latest && \
139+
140+ unset DOPPLER_TOKEN && \
133141 docker image prune -f
0 commit comments