Skip to content

2.0.40

2.0.40 #1734

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- '**'
tags:
- 'v*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build-and-push-app:
# This only makes sense to run for pastvu owned repo.
if: github.repository_owner == 'pastvu'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build backend
- name: Backend metadata
id: docker_meta_backend
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/pastvu/backend/ru
- name: Build and push backend
id: docker_build_backend
uses: docker/build-push-action@v5
with:
context: .
file: ./.docker/backend.Dockerfile
tags: ${{ steps.docker_meta_backend.outputs.tags }}
labels: ${{ steps.docker_meta_backend.outputs.labels }}
push: true
# Build frontend
- name: Frontend Metadata
id: docker_meta_frontend
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/pastvu/frontend/ru
- name: Build and push frontend
id: docker_build_frontend
uses: docker/build-push-action@v5
with:
context: .
file: ./.docker/frontend.Dockerfile
tags: ${{ steps.docker_meta_frontend.outputs.tags }}
labels: ${{ steps.docker_meta_frontend.outputs.labels }}
push: true
- name: Image digest
run: |
echo ${{ steps.docker_build_backend.outputs.digest }}
echo ${{ steps.docker_build_frontend.outputs.digest }}