Repository navigation
71 lines (60 loc) · 2.07 KB
/
Copy pathdeploy-dev.yml
File metadata and controls
71 lines (60 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy (dev)
# main에 푸시되면 dev 환경으로 배포한다.
on:
push:
branches: [main]
concurrency:
group: deploy-dev
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set image name (lowercase)
id: image
run: echo "name=${REGISTRY}/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.image.outputs.name }}
tags: |
type=raw,value=dev
type=sha,format=short
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# @wanteddev·@billilge 사설 패키지 설치용 토큰 (read:packages)
secrets: |
node_auth_token=${{ secrets.WDS_NPM_TOKEN }}
# K-CONNECT client_id (저장소 Actions 변수 VITE_KCONNECT_CLIENT_ID) — 번들에 들어가는 공개 값이라 시크릿이 아니다
build-args: |
VITE_KCONNECT_CLIENT_ID=${{ vars.VITE_KCONNECT_CLIENT_ID }}
- name: Deploy to Coolify
run: |
curl --fail-with-body --request POST \
--connect-timeout 10 --max-time 60 \
"${{ secrets.COOLIFY_URL }}/api/v1/deploy?uuid=${{ secrets.COOLIFY_DEV_UUID }}&force=true" \
--header "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
--header "Content-Length: 0"