Skip to content

Delete workflows/local_5678_валерия_б/personal directory #2

Delete workflows/local_5678_валерия_б/personal directory

Delete workflows/local_5678_валерия_б/personal directory #2

Workflow file for this run

name: Build and Push
on:
push:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
# Формує ім'я виду: ghcr.io/твій_юзернейм/serotonin_script
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # Дозвіл на запис у GHCR
strategy:
matrix:
target: [backend, worker, scheduler]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} # Це вбудований токен, його не треба створювати
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.target }}
tags: |
type=raw,value=latest
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: infra/docker/Dockerfile
target: ${{ matrix.target }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}