Skip to content

add main

add main #133

Workflow file for this run

name: Node CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- run: make setup
- run: make lint
- run: make test
deploy:
needs: build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v3
with:
context: .
push: true
cache-from: hexletcomponents/fastify-nodejs-application:latest
cache-to: type=inline
tags: hexletcomponents/fastify-nodejs-application:latest