fix(deploy): apply default envvar values for config checking #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |