Skip to content

Commit 7ff7518

Browse files
committed
github actions
1 parent 3ea2881 commit 7ff7518

2 files changed

Lines changed: 58 additions & 52 deletions

File tree

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
biome:
11+
name: Code Quality
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Run Biome
17+
uses: docker://ghcr.io/biomejs/biome:latest
18+
with:
19+
args: ci --verbose
20+
21+
docker-build:
22+
name: Build Docker Image
23+
runs-on: ubuntu-latest
24+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
25+
permissions:
26+
contents: read
27+
packages: write
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Log in to GitHub Container Registry
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Extract metadata
42+
id: meta
43+
uses: docker/metadata-action@v5
44+
with:
45+
images: ghcr.io/${{ github.repository }}
46+
tags: |
47+
type=sha,prefix=
48+
type=ref,event=branch
49+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
50+
51+
- name: Build and push
52+
uses: docker/build-push-action@v5
53+
with:
54+
context: .
55+
push: true
56+
tags: ${{ steps.meta.outputs.tags }}
57+
cache-from: type=gha
58+
cache-to: type=gha,mode=max

.gitlab-ci.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)