ci: pdating node tagging #12
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-and-tag-images: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- dockerfile: ./apps/web/Dockerfile | ||
image: ghcr.io/${{ github.repository_owner }}/web | ||
build_if: ${{ inputs.tag_web || github.event_name == 'push' }} | ||
- dockerfile: ./apps/api/Dockerfile | ||
image: ghcr.io/${{ github.repository_owner }}/api | ||
build_if: ${{ inputs.tag_api || github.event_name == 'push' }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
if: ${{ matrix.build_if }} | ||
Check failure on line 38 in .github/workflows/node-tag.yml
|
||
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 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ${{ matrix.dockerfile }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ matrix.image }}:node-new | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |