-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.49 KB
/
pipeline.yml
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
name: Karr Pipeline (lint, build)
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
env:
DENO_DIR: .deno
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Use Deno Version
uses: denolib/setup-deno@v2
with:
deno-version: 2.1.2
- name: Format all files
run: deno fmt --check
- name: Lint project
run: deno lint
build-api:
needs: lint
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push API Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./apps/api/Dockerfile
push: true
tags: |
ghcr.io/finxol/karr-api:latest
ghcr.io/finxol/karr-api:${{ github.sha }}