forked from tempoxyz/tempo
-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (119 loc) · 4.08 KB
/
Copy pathdocker.yml
File metadata and controls
130 lines (119 loc) · 4.08 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Docker Build
on:
push:
branches:
- main
tags:
- "v*.*.*"
merge_group:
workflow_dispatch:
inputs:
nightly:
description: "Tag nightly"
type: boolean
default: false
workflow_call:
schedule:
- cron: "5 9 * * *"
- cron: "30 20 * * *"
env:
REGISTRY: ghcr.io/tempoxyz
jobs:
build-and-push:
name: Build and Push Docker Images
runs-on: depot-ubuntu-latest-16
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: depot/setup-action@v1
- name: Docker metadata for tempo
id: meta-tempo
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/tempo
bake-target: tempo
tags: |
type=schedule,pattern=nightly
type=raw,value=nightly,enable=${{ github.event.inputs.nightly == 'true' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=sha,prefix=sha-
type=ref,event=pr
- name: Docker metadata for tempo-bench
id: meta-tempo-bench
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/tempo-bench
bake-target: tempo-bench
tags: |
type=schedule,pattern=nightly
type=raw,value=nightly,enable=${{ github.event.inputs.nightly == 'true' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=sha,prefix=sha-
type=ref,event=pr
- name: Docker metadata for tempo-sidecar
id: meta-tempo-sidecar
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/tempo-sidecar
bake-target: tempo-sidecar
tags: |
type=schedule,pattern=nightly
type=raw,value=nightly,enable=${{ github.event.inputs.nightly == 'true' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=sha,prefix=sha-
type=ref,event=pr
- name: Docker metadata for tempo-xtask
id: meta-tempo-xtask
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/tempo-xtask
bake-target: tempo-xtask
tags: |
type=schedule,pattern=nightly
type=raw,value=nightly,enable=${{ github.event.inputs.nightly == 'true' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=edge,branch=main
type=sha,prefix=sha-
type=ref,event=pr
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: shortsha
run: echo "shortsha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
- name: Build and push Docker images
uses: depot/bake-action@v1
with:
files: |
docker-bake.hcl
${{ steps.meta-tempo.outputs.bake-file }}
${{ steps.meta-tempo-bench.outputs.bake-file }}
${{ steps.meta-tempo-sidecar.outputs.bake-file }}
${{ steps.meta-tempo-xtask.outputs.bake-file }}
targets: default
project: 0c6tg19qsp
push: true
env:
VERGEN_GIT_SHA: ${{ github.sha }}
VERGEN_GIT_SHA_SHORT: ${{ steps.shortsha.outputs.shortsha }}