-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.39 KB
/
build-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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/