-
Notifications
You must be signed in to change notification settings - Fork 170
65 lines (57 loc) · 2 KB
/
release-umee-docker.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
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
name: Umeed Docker Release
on:
push:
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+" # Push only official release version tags e.g. v2.0.5
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: false
jobs:
umeed-docker:
name: umee Docker
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
# github.repository == <account>/<repo>
images: ghcr.io/${{ github.repository_owner }}/umeed
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern=latest-{{major}}.{{minor}}
flavor: |
latest=false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Print tags and labels
run: |
echo image: ${{ env.REGISTRY }}/${{ github.repository }}
echo tags "${{ steps.meta.outputs.tags }}"
echo labels "${{ steps.meta.outputs.labels }}"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate swagger docs
run: |
make proto-swagger-gen
make proto-update-swagger-docs
- name: Build and push
uses: docker/build-push-action@v6
with:
file: ./contrib/images/umeed.dockerfile
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64 # requires qemu action
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max