Skip to content

refactor(backend): streamline stream-check worker logic and enhance e… #40

refactor(backend): streamline stream-check worker logic and enhance e…

refactor(backend): streamline stream-check worker logic and enhance e… #40

Workflow file for this run

name: Publish Docker images
on:
push:
branches:
- main
paths:
- "apps/**"
- "packages/**"
- ".github/workflows/**"
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker images to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Read version from package.json
id: get_version
working-directory: ./
run: |
VERSION=$(jq -r '.version' package.json)
echo "Current version: $VERSION"
echo "version=$VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ secrets.DOCKER_USERNAME }}/moroccan-stream:${{ env.version }}
${{ secrets.DOCKER_USERNAME }}/moroccan-stream:latest