ci: pdating node tagging #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & tag Docker images with :node-new tag | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_web: | |
description: 'Build and tag web image with :node-new' | |
type: boolean | |
default: true | |
tag_api: | |
description: 'Build and tag api image with :node-new' | |
type: boolean | |
default: true | |
push: | |
branches: | |
- feat/migrate-to-node-js | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-web: | |
runs-on: ubuntu-24.04 | |
if: ${{ inputs.tag_web || github.event_name == 'push' }} | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GH_PACKAGE_TOKEN }} | |
- name: Build and push web image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./apps/web/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/web:node-new | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-api: | |
runs-on: ubuntu-24.04 | |
if: ${{ inputs.tag_api || github.event_name == 'push' }} | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GH_PACKAGE_TOKEN }} | |
- name: Build and push api image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./apps/api/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/api:node-new | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |