Skip to content

πŸͺ› Manual build #59

πŸͺ› Manual build

πŸͺ› Manual build #59

Workflow file for this run

# Manual Docker build
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 Docker image
runs-on: ubuntu-latest
environment:
name: test-release
url: https://hub.docker.com/r/michelealberti/data-lunch-app
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@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/web/Dockerfile.web
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ vars.DOCKER_HUB_USERNAME }}/data-lunch-app:${{ github.event.inputs.tag }}
cache-from: type=registry,ref=${{ vars.DOCKER_HUB_USERNAME }}/data-lunch-app:buildcache
cache-to: type=registry,ref=${{ vars.DOCKER_HUB_USERNAME }}/data-lunch-app:buildcache,mode=max