Skip to content

Docker Build

Docker Build #578

Workflow file for this run

name: Docker Build
on:
# Manual trigger only
workflow_dispatch:
jobs:
swirl-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout the Code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
- name: Build and Push Swirl Docker Image
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
TAG_NAME=$([ "$BRANCH_NAME" = "main" ] && echo "latest" || echo "$BRANCH_NAME")
docker buildx use devBuilder || docker buildx create --name devBuilder --use
docker buildx build -t swirlai/swirl-search:$TAG_NAME --platform linux/amd64,linux/arm64 --push .
- name: Update the Docker Repo Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.SBS_DOCKER_USER }}
password: ${{ secrets.SBS_DOCKER_PAT }}
repository: swirlai/swirl-search
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v4
with:
name: log-files
path: |
logs/
/var/log/syslog*