-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.62 KB
/
publish_hugegraph_hubble.yml
File metadata and controls
58 lines (52 loc) · 1.62 KB
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
50
51
52
53
54
55
56
57
58
name: Publish hubble image
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
inputs:
repository_url:
required: true
default: 'apache/hugegraph-toolchain'
repository_branch:
required: true
default: 'master'
image_url:
required: true
default: 'hugegraph/hubble'
tag:
required: true
default: 'latest'
jobs:
build:
runs-on: ubuntu-latest
env:
# TODO: support auto tag/label the images by action
# Refer: https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
IMAGE_URI: ${{ inputs.image_url }}:${{ inputs.tag }}
steps:
# Used for build X64 & ARM images together
# Refer: https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
#registry: ${{ inputs.docker_registry_url }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Checkout
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository_url }}
ref: ${{ inputs.repository_branch }}
fetch-depth: 2
- name: Build X86 Image
uses: docker/build-push-action@v4
with:
context: .
file: ./hugegraph-hubble/Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ env.IMAGE_URI }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max