Skip to content

Simplified build steps #1

Simplified build steps

Simplified build steps #1

Workflow file for this run

name: Build & Publish Docker Images
on:
push:
branches:
- alpha
jobs:
build:
runs-on: self-hosted
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Login to GitHub Container Registry
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@master
with:
push: true
context: ./${{ env.MODULE_KEY }}
file: ./${{ env.MODULE_KEY }}/Dockerfile
tags: ghcr.io/carrismetropolitana/api-${{ env.MODULE_KEY }}:${{ github.ref_name }}-arm