forked from victor-rds/docker-etebase
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (82 loc) · 3.58 KB
/
ztest_call_metadata.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
name: (Test) Metadata Actions for Dispatch Build
on:
workflow_call:
inputs:
flavor:
description: "Set the base image [base, slim or alpine]"
default: "base"
required: false
type: string
version:
description: "EteBase Version"
required: false
type: string
platforms:
description: "Set the platforms to build [ linux/amd64, linux/arm64 or linux/arm/v7 ]"
default: "linux/amd64,linux/arm64,linux/arm/v7"
required: false
type: string
tag:
description: "Tag"
required: false
type: string
pushit:
description: "Should push?"
default: false
required: false
type: boolean
jobs:
test-data:
runs-on: ubuntu-latest
steps:
- name: Checkout Dockerfiles and Context
uses: actions/checkout@v3
- id: server_version
uses: ./.github/actions/get-server-version
with:
force: ${{ inputs.version }}
- id: build_metadata
name: Prepare Project Metadata
uses: ./.github/actions/build-metadata
with:
flavor: ${{ inputs.flavor }}
version: ${{ steps.server_version.outputs.version }}
- id: docker_metadata
name: Prepare Docker Metadata
uses: docker/[email protected]
with:
labels: |
maintainer=victor-rds
version=${{ steps.build_metadata.outputs.label_version }}
org.opencontainers.image.authors=Victor R. Santos <[email protected]>
org.opencontainers.image.title=Docker Etebase Server
org.opencontainers.image.base.name=${{ steps.build_metadata.outputs.base_version }}
images: |
victorrds/etebase
victorrds/etesync
flavor: |
latest=${{ ( inputs.flavor == 'base' && steps.build_metadata.outputs.semver == 'true' ) }}
suffix=${{ steps.build_metadata.outputs.suffix }}
tags: |
type=edge,enable=${{ inputs.tag == 'edge' }},branch=${{ steps.build_metadata.outputs.source_name }}
type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' && inputs.tag != 'edge' }}
type=raw,value=${{ inputs.flavor }},suffix=,enable=${{ steps.build_metadata.outputs.semver == 'true' }}
type=semver,pattern={{version}},value=${{ steps.build_metadata.outputs.ete_version }},enable=${{ inputs.tag == '' && steps.build_metadata.outputs.semver == 'true' }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.build_metadata.outputs.ete_version }},enable=${{ inputs.tag == '' && steps.build_metadata.outputs.semver == 'true' }}
- name: Metadata Output
shell: bash
run: |
echo -e '########## inputs ##########\n'
echo -e "flavor: ${{ inputs.flavor }}\n"
echo -e "version: ${{ inputs.version }}\n"
echo -e "platforms: ${{ inputs.platforms }}\n"
echo -e "tag: ${{ inputs.tag }}\n"
echo -e "pushit: ${{ inputs.pushit }}\n"
echo -e '########## build_metadata ##########\n'
echo -e "source_name: ${{ steps.build_metadata.outputs.source_name }}\n"
echo -e "suffix: ${{ steps.build_metadata.outputs.suffix }}\n"
echo -e "base_version: ${{ steps.build_metadata.outputs.base_version }}\n"
echo -e "label_version: ${{ steps.build_metadata.outputs.label_version }}\n"
echo -e "ete_version: ${{ steps.build_metadata.outputs.ete_version }}\n"
echo -e "semver: ${{ steps.build_metadata.outputs.semver }}\n"