-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.78 KB
/
release.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
name: release
on:
push:
tags:
- v*
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- uses: docker/build-push-action@v2
with:
file: build/kopilot-hub/Dockerfile
build-args: AGENT_IMAGE=smartxrocks/kopilot-agent:${{ steps.get_version.outputs.version }}
platforms: linux/amd64,linux/arm64
tags: smartxrocks/kopilot-hub:${{ steps.get_version.outputs.version }}
push: true
- uses: docker/build-push-action@v2
with:
file: build/kopilot-agent/Dockerfile
platforms: linux/amd64,linux/arm64
tags: smartxrocks/kopilot-agent:${{ steps.get_version.outputs.version }}
push: true
- run: curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && sudo install skaffold /usr/local/bin/ && rm -rf skaffold
- run: make manifests
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: manifests.yaml
asset_name: kopilot.yaml
asset_content_type: text/yaml