Skip to content

Build fresh image

Build fresh image #359

Workflow file for this run

name: Build fresh image
on:
push:
schedule:
- cron: "42 03 * * *"
jobs:
buildandpush:
runs-on: ubuntu-latest
permissions:
packages: write
name: Build images and push to registry
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
# https://github.com/docker/login-action#docker-hub
- name: Login to registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build latest and push to registry
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
push: true
tags: ghcr.io/deltablot/php-prod:8.3, ghcr.io/deltablot/php-prod:latest, ghcr.io/deltablot/php-prod:8