Skip to content

ML-powered behavioral anomaly detector that learns normal log pattern… #2

ML-powered behavioral anomaly detector that learns normal log pattern…

ML-powered behavioral anomaly detector that learns normal log pattern… #2

name: Website Docker CICD
on:
push:
branches: [main, dev]
paths:
- 'website/**'
pull_request:
branches: [main, dev]
paths:
- 'website/**'
jobs:
build-and-push:
name: Build & Push Website Image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: trydirect/stackdog-website
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
type=sha,format=short
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./website
file: ./website/Dockerfile
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max