mirror of
https://github.com/TautvydasDerzinskas/Thingport.git
synced 2026-10-21 14:12:25 -05:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Manual image publish
|
|
|
|
# Builds and pushes either or both images on demand, e.g. after a base-image security update.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
target:
|
|
description: "Which image(s) to build and publish"
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- backend
|
|
- frontend
|
|
- both
|
|
default: both
|
|
version:
|
|
description: "Optional: an existing release (e.g. 1.0.1) to build from its git tag and tag X.Y.Z, X.Y and X"
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
|
|
jobs:
|
|
backend:
|
|
if: inputs.target == 'backend' || inputs.target == 'both'
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
uses: ./.github/workflows/build-image.yml
|
|
with:
|
|
ref: ${{ inputs.version && format('thingport-backend-v{0}', inputs.version) || '' }}
|
|
version: ${{ inputs.version }}
|
|
project_dir: backend
|
|
image_name: ghcr.io/${{ github.repository_owner }}/thingport-backend
|
|
context: ./backend
|
|
dockerfile: backend/Dockerfile
|
|
cache_scope: backend
|
|
push: true
|
|
secrets: inherit
|
|
|
|
frontend:
|
|
if: inputs.target == 'frontend' || inputs.target == 'both'
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
uses: ./.github/workflows/build-image.yml
|
|
with:
|
|
ref: ${{ inputs.version && format('thingport-frontend-v{0}', inputs.version) || '' }}
|
|
version: ${{ inputs.version }}
|
|
project_dir: frontend
|
|
image_name: ghcr.io/${{ github.repository_owner }}/thingport-frontend
|
|
context: ./frontend
|
|
dockerfile: frontend/Dockerfile
|
|
cache_scope: frontend
|
|
push: true
|
|
secrets: inherit
|