Skip to content

Merge branch 'master' into chat_log #46

Merge branch 'master' into chat_log

Merge branch 'master' into chat_log #46

Workflow file for this run

name: Build and Push Docker Image
on:
push:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set image tag
id: tag
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
if [ "$BRANCH_NAME" = "master" ]; then
echo "IMAGE_TAG=latest" >> $GITHUB_OUTPUT
else
SAFE_BRANCH_NAME=${BRANCH_NAME//\//-}
echo "IMAGE_TAG=$SAFE_BRANCH_NAME" >> $GITHUB_OUTPUT
fi
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/streamonitor:${{ steps.tag.outputs.IMAGE_TAG }}