Skip to content

ci: add github actions #28

ci: add github actions

ci: add github actions #28

Workflow file for this run

name: Messenger
on:
push:
branches:
- main
- features/**
- dependabot/**
- master
pull_request:
branches:
- main
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dockerfile: ./frontend/Dockerfile
context: ./frontend
image: ghcr.io/Impeqq/web
- dockerfile: ./backend/Dockerfile
context: ./backend
image: ghcr.io/Impeqq/api
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ matrix.image }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Run Docker Compose
run: docker compose up -d