Skip to content

Commit

Permalink
ci: add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSamuel committed Sep 18, 2024
1 parent ff33ff5 commit 67167e7
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint-and-build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Yarn
run: yarn install

- name: Lint code
run: yarn lint

- name: Build code
run: yarn build

docker-build:
runs-on: ubuntu-latest
needs: lint-and-build

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker image
run: |
docker build -t your-project-name:latest .

0 comments on commit 67167e7

Please sign in to comment.