Skip to content

Commit

Permalink
feat(deploy): add container build
Browse files Browse the repository at this point in the history
Only build the API container for now
  • Loading branch information
finxol committed Dec 13, 2024
1 parent b9390dc commit 298cf9a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/lint.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Lint Deno Project

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'
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: .
dockerfile: ./apps/api/Dockerfile
push: true
tags: |
ghcr.io/finxol/karr-api:latest
ghcr.io/finxol/karr-api:${{ github.sha }}

0 comments on commit 298cf9a

Please sign in to comment.