All checks were successful
Build and Push Chill base image / build-and-push (push) Successful in 3m53s
Reviewed-on: Chill-project/ci-image#1 Co-authored-by: Julien Fastré <julien.fastre@champs-libres.coop> Co-committed-by: Julien Fastré <julien.fastre@champs-libres.coop>
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: Build and Push Chill base image
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '25 3 * * 1-5' # At 03:25 on every day-of-week from Monday through Friday.
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: cth-ubuntu-latest
|
|
|
|
env:
|
|
IMAGE_NAME: chill/base-image
|
|
IMAGE_FLAVOR: 8.3
|
|
CONTEXT: php/8.3
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Docker hub
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: https://github.com/docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.IMAGE_NAME }}
|
|
flavor: |
|
|
prefix=${{ env.IMAGE_FLAVOR }}-
|
|
tags: |
|
|
type=schedule
|
|
type=edge
|
|
type=ref,event=branch
|
|
|
|
- name: Debug metadata
|
|
run: |
|
|
echo "Tags: ${{ steps.meta.outputs.tags }}"
|
|
echo "Labels: ${{ steps.meta.outputs.labels }}"
|
|
|
|
- name: Build and push
|
|
id: build-push
|
|
uses: https://github.com/docker/build-push-action@v5
|
|
with:
|
|
context: "{{ defaultContext }}:${{ env.CONTEXT }}"
|
|
file: Dockerfile
|
|
pull: true
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }} |