-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only build the API container for now
- Loading branch information
Showing
2 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 }} |