-
Notifications
You must be signed in to change notification settings - Fork 18
132 lines (118 loc) · 4.75 KB
/
merge-main.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
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
131
132
name: Merge PR to main
on:
pull_request:
types:
- closed
branches:
- main
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
concurrency: release
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python version
uses: actions/setup-python@v5
with:
python-version: '3.11'
# - name: Dry Run to get next release version
# id: next_version
# shell: bash
# run: |
# pip install python-semantic-release
# echo "new_tag_version=$(semantic-release --noop version --print)" >> $GITHUB_OUTPUT
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# shell: bash
# run: |
# echo "the release status is: ${{ steps.release.outputs.released }}"
# echo "the new version is: ${{ steps.release.outputs.version }}"
# echo "the new tag version is: ${{ steps.release.outputs.tag }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish vidvec amd64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: worker/vidvec/Dockerfile.video_worker
tags: worker-amd64-${{ steps.release.outputs.tag }}
platforms: linux/amd64
- name: Publish vidvec arm64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-vidvec
workdir: src/
dockerfile: worker/vidvec/Dockerfile.video_worker_graviton
tags: worker-arm64-${{ steps.release.outputs.tag }}
platforms: linux/arm64
- name: Publish audiovec amd64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-audiovec
workdir: src/
dockerfile: worker/audiovec/Dockerfile.audio_worker
tags: worker-amd64-${{ steps.release.outputs.tag }}
platforms: linux/amd64
- name: Publish audiovec arm64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-audiovec
workdir: src/
dockerfile: worker/audiovec/Dockerfile.audio_worker_graviton
tags: worker-arm64-${{ steps.release.outputs.tag }}
platforms: linux/arm64
- name: Publish media hash amd64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-hash
workdir: src/
dockerfile: worker/hash/Dockerfile.hash_worker
tags: worker-amd64-${{ steps.release.outputs.tag }}
platforms: linux/amd64
- name: Publish media hash arm64 worker to dockerhub
if: steps.release.outputs.released == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-operator-hash
workdir: src/
dockerfile: worker/hash/Dockerfile.hash_worker_graviton
tags: worker-arm64-${{ steps.release.outputs.tag }}
platforms: linux/arm64
# - name: deploy to cluster
# uses: steebchen/[email protected]
# with: # defaults to latest kubectl binary version
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# command: set image --record deployment/feluda-server feluda-server=tattletech/feluda-server:${{ steps.vars.outputs.sha_short }}
# - name: verify deployment
# uses: steebchen/[email protected]
# with:
# config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
# version: v1.21.0 # specify kubectl binary version explicitly
# command: rollout status deployment/feluda-server