Skip to content

Update command_handler.rs #307

Update command_handler.rs

Update command_handler.rs #307

Workflow file for this run

name: Publish backend to GHCR
on:
workflow_dispatch:
release:
types: [published]
push:
paths: ["backend/**"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: kronos-et-al/mensa-app
jobs:
build-and-push-backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
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) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:backend"
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}