Skip to content

Merge pull request #20 from DIYgod/master #28

Merge pull request #20 from DIYgod/master

Merge pull request #20 from DIYgod/master #28

Workflow file for this run

name: 'Docker Custom Build'
on:
push:
branches:
- master
paths:
- '.github/workflows/docker-custom.yml'
- 'lib/**'
- '!lib/**/*.test.ts'
- 'Dockerfile'
workflow_dispatch: {}
jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable=true
type=raw,value={{date 'YYYY-MM-DD'}},enable=true
type=sha,format=long,prefix=,enable=true
flavor: latest=false
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=docker-custom
cache-to: type=gha,mode=max,scope=docker-custom
- name: Trigger Coolify redeployment
run: |
curl --silent --fail --show-error -X GET \
"${{ secrets.COOLIFY_WEBHOOK_URL }}?force=true"