Skip to content

Commit

Permalink
ci: CI 추가
Browse files Browse the repository at this point in the history
다음의 역할을 수행함
- release 태그 버저닝
- 이미지 생성 자동화
  • Loading branch information
laigasus committed Nov 21, 2024
1 parent 6b74996 commit 9dc7f66
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release images using semantic tag versioning

on:
push:
branches: [ main, develop ]

jobs:
setup-build-deploy:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write

steps:
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

- name: Source Code Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ steps.tag_version.outputs.new_tag }}
ghcr.io/${{ github.repository }}:latest

0 comments on commit 9dc7f66

Please sign in to comment.