Skip to content

Commit 9dc7f66

Browse files
committed
ci: CI 추가
다음의 역할을 수행함 - release 태그 버저닝 - 이미지 생성 자동화
1 parent 6b74996 commit 9dc7f66

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: release images using semantic tag versioning
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
7+
jobs:
8+
setup-build-deploy:
9+
name: Setup, Build, and Deploy
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
contents: write
14+
id-token: write
15+
16+
steps:
17+
- name: Bump version and push tag
18+
id: tag_version
19+
uses: mathieudutour/github-tag-action@v6.2
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Create a GitHub release
24+
uses: ncipollo/release-action@v1
25+
with:
26+
tag: ${{ steps.tag_version.outputs.new_tag }}
27+
name: ${{ steps.tag_version.outputs.new_tag }}
28+
body: ${{ steps.tag_version.outputs.changelog }}
29+
30+
- name: Source Code Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Login to GitHub Container Registry
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ghcr.io
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Build and push
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: ./Dockerfile
48+
push: true
49+
tags: |
50+
ghcr.io/${{ github.repository }}:${{ steps.tag_version.outputs.new_tag }}
51+
ghcr.io/${{ github.repository }}:latest

0 commit comments

Comments
 (0)