Skip to content

fix issue with excluded last day of month #14

fix issue with excluded last day of month

fix issue with excluded last day of month #14

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches: [main, master]
tags: ["v*"]
pull_request:
branches: [main, master]
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- service: web
context: ./web
- service: api
context: ./api
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.service }}
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
type=sha,prefix=
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
platforms: linux/arm64 # Only arm64 for Raspberry Pi
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.service }}
cache-to: type=gha,scope=${{ matrix.service }},mode=max
summary:
needs: build
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- name: Deployment summary
run: |
echo "## 🚀 Images Published" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY }}/${{ github.repository }}-web:latest\`" >> $GITHUB_STEP_SUMMARY
echo "- \`${{ env.REGISTRY }}/${{ github.repository }}-api:latest\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Run \`./deploy.sh\` on your Pi to update." >> $GITHUB_STEP_SUMMARY