mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04:00
* Specify COMMIT argument for Docker image build * Use correct variable --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Build Containers
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
tag:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
DOCKERHUB_USERNAME:
|
|
required: true
|
|
DOCKERHUB_TOKEN:
|
|
required: true
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Override __init__.py
|
|
run: |
|
|
echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
file: ./docker/Dockerfile
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ghcr.io/${{ github.repository }}:${{ inputs.tag }}
|
|
build-args: |
|
|
COMMIT=${{ github.sha }}
|