Skip to content

🪛 Manual build

🪛 Manual build #52

Workflow file for this run

# Bump version with Commitizen
name: Manual build
on:
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: true
default: 'latest'
build_description:
description: 'Build description'
jobs:
build_container:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Print build info
run: |
echo "Image tag: ${{ github.event.inputs.tag }}"
echo "Description: ${{ github.event.inputs.build_description }}"
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./
file: ./docker/web/Dockerfile.web
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/data-lunch-app:${{ github.event.inputs.tag }}
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/data-lunch-app:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/data-lunch-app:buildcache,mode=max