Skip to content

docker: Add HEALTHCHECK to Dockerfile (#508) #371

docker: Add HEALTHCHECK to Dockerfile (#508)

docker: Add HEALTHCHECK to Dockerfile (#508) #371

Workflow file for this run

name: Build and Push Docker
on:
release:
types:
- created
push:
branches:
- main
jobs:
push:
strategy:
fail-fast: false
matrix:
include:
- package: hoarder-web
target: web
- package: hoarder-workers
target: workers
- package: hoarder-cli
target: cli
- package: hoarder
target: aio
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_GITHUB_PAT }}
- name: Build ${{ matrix.package }}
uses: docker/build-push-action@v5
with:
context: .
build-args: SERVER_VERSION=nightly
file: docker/Dockerfile
target: ${{ matrix.target }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/hoarder-app/${{ matrix.package }}:latest,ghcr.io/mohamedbassem/${{ matrix.package }}:latest
cache-from: type=registry,ref=ghcr.io/hoarder-app/hoarder-build-cache:${{ matrix.target }}
cache-to: type=registry,mode=max,ref=ghcr.io/hoarder-app/hoarder-build-cache:${{ matrix.target }}
- name: Build ${{ matrix.package }} (release)
uses: docker/build-push-action@v5
if: github.event_name == 'release'
with:
context: .
build-args: SERVER_VERSION=${{ github.event.release.name }}
file: docker/Dockerfile
target: ${{ matrix.target }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/hoarder-app/${{ matrix.package }}:${{ github.event.release.name }},ghcr.io/hoarder-app/${{ matrix.package }}:release,ghcr.io/mohamedbassem/${{ matrix.package }}:${{ github.event.release.name }},ghcr.io/mohamedbassem/${{ matrix.package }}:release
cache-from: type=registry,ref=ghcr.io/hoarder-app/hoarder-build-cache:${{ matrix.target }}
cache-to: type=registry,mode=max,ref=ghcr.io/hoarder-app/hoarder-build-cache:${{ matrix.target }}