Skip to content

ci(gh-actions): update cron schedule to run every Monday at 10:00 GMT+7 #19

ci(gh-actions): update cron schedule to run every Monday at 10:00 GMT+7

ci(gh-actions): update cron schedule to run every Monday at 10:00 GMT+7 #19

Workflow file for this run

name: 🐳 Docker Workflow
on:
push:
branches:
- main
- docker
pull_request:
branches:
- docker
workflow_dispatch:
inputs:
image_tag:
description: 'Docker image tag to use (default: latest)'
required: false
default: 'latest'
build_context:
description: 'Build context directory (default: .)'
required: false
default: '.'
schedule:
- cron: '0 10 * * 1' # Every Monday (GMT+7)
env:
REGISTRY: ghcr.io
IMAGE_NAME: pungrumpy/dotfiles
permissions:
id-token: write
packages: write
contents: read
attestations: write
jobs:
build-and-push:
name: πŸš€ Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: πŸ›ŽοΈ Checkout Repository
uses: actions/checkout@v4
- name: πŸ”‘ Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: πŸͺ™ Extract Metadata for Docker
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ github.event.inputs.image_tag || 'latest' }}
- name: πŸ—οΈ Build and Push Docker Image
id: build
uses: docker/build-push-action@v5
with:
context: ${{ github.event.inputs.build_context || '.' }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
- name: πŸ“¦ Generate Artifact Attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true