Skip to content

chore: update nitro.config.ts to remove node_cluster preset; add NITR… #15

chore: update nitro.config.ts to remove node_cluster preset; add NITR…

chore: update nitro.config.ts to remove node_cluster preset; add NITR… #15

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE_NAME: bysages/lens
NIXPACKS_NODE_VERSION: 22
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata for tags
id: meta
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "tags<<EOF" >> $GITHUB_OUTPUT
echo "${{ env.IMAGE_NAME }}:${VERSION}" >> $GITHUB_OUTPUT
echo "${{ env.IMAGE_NAME }}:latest" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
else
echo "tags<<EOF" >> $GITHUB_OUTPUT
echo "${{ env.IMAGE_NAME }}:latest" >> $GITHUB_OUTPUT
echo "${{ env.IMAGE_NAME }}:sha-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
fi
- name: Build and push Docker images
uses: iloveitaly/github-action-nixpacks@main
with:
push: ${{ github.event_name != 'pull_request' }}
cache: true
cache_tag: ${{ env.IMAGE_NAME }}:cache
tags: ${{ steps.meta.outputs.tags }}
env: |
NIXPACKS_NODE_VERSION=${{ env.NIXPACKS_NODE_VERSION }}