Skip to content

fix: resolve multiple bugs found during comprehensive code review #131

fix: resolve multiple bugs found during comprehensive code review

fix: resolve multiple bugs found during comprehensive code review #131

Workflow file for this run

---
name: Build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 1 * * 6'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/crontab
jobs:
build-crontab:
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
contents: read
packages: write
steps:
- name: Checkout repository.
uses: actions/checkout@v6
with:
submodules: true
- name: Log in to the GitHub Container Registry.
if: github.event_name != 'pull_request'
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata (tags, labels) for Docker.
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=schedule,pattern={{date 'YYYYMMDD'}}
- name: Set up QEMU.
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx.
uses: docker/setup-buildx-action@v4
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
- name: Build and push Docker image to GitHub Container Registry.
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_DATE=${{ github.event.repository.pushed_at }}
provenance: true
sbom: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Send notification to Discord.
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}