ci(gitea): migrate pipeline from GitLab to Gitea Actions
This commit is contained in:
28
.gitea/workflows/ci.yml
Normal file
28
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: denoland/setup-deno@v2
|
||||||
|
with:
|
||||||
|
deno-version: v2.x
|
||||||
|
|
||||||
|
- name: Format check
|
||||||
|
run: deno fmt --check
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: deno lint
|
||||||
|
|
||||||
|
- name: Type check
|
||||||
|
run: deno check jetstream.ts server.ts scripts/*.ts src/migrations/init.ts
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: deno test --allow-all --permit-no-files
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
|
||||||
IMAGE_TAG: $CI_REGISTRY/litenote:$CI_COMMIT_REF_SLUG
|
|
||||||
IMAGE_LATEST: $CI_REGISTRY/litenote:latest
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
image: docker:24-dind
|
|
||||||
services:
|
|
||||||
- docker:24-dind
|
|
||||||
before_script:
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
script:
|
|
||||||
- docker build -t $IMAGE_TAG -t $IMAGE_LATEST .
|
|
||||||
- docker push $IMAGE_TAG
|
|
||||||
- docker push $IMAGE_LATEST
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
Reference in New Issue
Block a user