mirror of
https://github.com/FunnyWolf/agentic-soc-platform.git
synced 2026-08-22 13:12:56 +02:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
name: Docker images
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
required: true
|
|
type: string
|
|
push:
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: Image tag to build.
|
|
required: true
|
|
default: dev
|
|
push:
|
|
description: Push images to GHCR.
|
|
required: true
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.name }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: backend
|
|
image: asp-backend
|
|
context: ./backend
|
|
file: ./backend/Dockerfile
|
|
- name: frontend
|
|
image: asp-frontend
|
|
context: ./frontend
|
|
file: ./frontend/Dockerfile
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: docker/setup-buildx-action@v4
|
|
- name: Resolve image tags
|
|
id: tags
|
|
shell: bash
|
|
run: |
|
|
owner="${GITHUB_REPOSITORY_OWNER,,}"
|
|
repo="${GITHUB_REPOSITORY#*/}"
|
|
repo="${repo,,}"
|
|
base="ghcr.io/${owner}/${repo}/${{ matrix.image }}"
|
|
{
|
|
echo "tags<<EOF"
|
|
echo "${base}:${{ inputs.version }}"
|
|
if [ "${{ inputs.version }}" != "dev" ]; then
|
|
echo "${base}:latest"
|
|
fi
|
|
echo "EOF"
|
|
} >> "$GITHUB_OUTPUT"
|
|
- name: Login to GHCR
|
|
if: inputs.push
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v7
|
|
with:
|
|
context: ${{ matrix.context }}
|
|
file: ${{ matrix.file }}
|
|
push: ${{ inputs.push }}
|
|
tags: ${{ steps.tags.outputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|