mirror of
https://github.com/chartdb/chartdb.git
synced 2026-05-04 00:40:09 -05:00
41 lines
912 B
YAML
41 lines
912 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 22.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22.x
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Build project
|
|
run: npm run build
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
run: |
|
|
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/$(basename ${{ github.repository }}):latest
|
|
docker build . --tag $IMAGE_NAME
|
|
docker push $IMAGE_NAME
|