Skip to content

feat: adding Docker registry publishing workflow #1

feat: adding Docker registry publishing workflow

feat: adding Docker registry publishing workflow #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
packages: write
jobs:
docker:
name: Build and push Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push backend
uses: docker/build-push-action@v6
with:
context: ./alon_sentinel
push: true
tags: |
ghcr.io/tomnekic/alon-sentinel:latest
ghcr.io/tomnekic/alon-sentinel:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push admin
uses: docker/build-push-action@v6
with:
context: ./alon_sentinel_admin
push: true
tags: |
ghcr.io/tomnekic/alon-sentinel-admin:latest
ghcr.io/tomnekic/alon-sentinel-admin:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max