-
Notifications
You must be signed in to change notification settings - Fork 12
63 lines (57 loc) · 1.72 KB
/
tag.yaml
File metadata and controls
63 lines (57 loc) · 1.72 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
name: Tag and Push
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
version:
description: 'Version number'
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release
# GITHUB_SHA = Last commit in the tagged release
# GITHUB_REF = Tag ref of release refs/tags/<tag_name>
jobs:
push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 'Build Images'
env:
DOCKER_BUILD_ARGS: "--push --platform linux/amd64,linux/arm64"
run: |
# if workflow_dispatch is used, use the version input
if [ -n "${{ github.event.inputs.version }}" ]; then
export VERSION=${{ github.event.inputs.version }}
else
export VERSION=$(echo "$GITHUB_REF" | cut -c12-)
fi
make build-mcp
release:
# Only run release after images and helm chart are pushed
# In the future we can take the chart from the helm action,
# and build the CLI beforehand.
needs:
- push-images
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')