Skip to content

Docker build and push #2

Docker build and push

Docker build and push #2

Workflow file for this run

name: Docker Build
on:
workflow_dispatch:
inputs:
Commit:
description: "Commit for checkout"
required: true
default: ""
Version:
description: "Version for tag"
required: true
default: ""
jobs:
build:
runs-on: ubuntu-latest
name: Build on ubuntu-latest
steps:
- name: Clone main repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Checkout the specified commit
run: git checkout ${{ github.event.inputs.Commit }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
install: true
- name: Build and push Docker images for Linux on amd64 and arm64
run: |
version=${{ github.event.inputs.Version }}
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t lifailon/lazyjournal:$version \
--push .