Skip to content

Build image

Build image #154

Workflow file for this run

name: Build image
on:
workflow_dispatch:
inputs:
release_version:
description: 'Latest version of Cloudlog to build'
required: true
jobs:
build_and_push:
name: Build and push Cloudlog Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
build-args: RELEASE_VERSION=${{ github.event.inputs.release_version }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/g7ufo/cloudlog:latest
ghcr.io/g7ufo/cloudlog:${{ github.event.inputs.release_version }}
labels: |
org.opencontainers.image.title=Cloudlog
org.opencontainers.image.description=Docker image for Cloudlog
org.opencontainers.image.url=https://github.com/g7ufo/cloudlog/pkgs/container/cloudlog/