Skip to content

Update build-image.yaml #3

Update build-image.yaml

Update build-image.yaml #3

Workflow file for this run

name: Build Docker Images for GHCR
on:
push:
branches:
- main
jobs:
build-image:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- Dockerfile: coffee-maker/Dockerfile
context: coffee-maker
tag: latest
name: "coffee-maker"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Checkout code
uses: actions/checkout@v4
- name: set repository name to lowercase
run: |
echo "reponame=${reponame,,}" >>${GITHUB_ENV}
env:
reponame: '${{ github.repository }}'
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/une-tasse-de.cafe/${{ env.reponame }}/${{ matrix.name }}:${{ matrix.tag }}
platforms: linux/amd64,linux/arm64