Skip to content

Commit 156e790

Browse files
committed
Add builder
1 parent 13a087b commit 156e790

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and push image
2+
3+
on: workflow_dispatch
4+
5+
env:
6+
IMAGE_NAME: relistennet/relisten-sonos # <‑‑ repo/image name in the registry
7+
REGISTRY: 100.97.22.118:32000
8+
TAG: latest
9+
10+
jobs:
11+
12+
build_push_and_rollout_restart:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Tailscale
19+
uses: tailscale/github-action@v3
20+
with:
21+
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
22+
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
23+
use-cache: 'true'
24+
tags: tag:ci
25+
version: latest
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
with:
30+
buildkitd-config-inline: |
31+
[registry."${{ env.REGISTRY }}"]
32+
http = true
33+
insecure = true
34+
35+
- name: Build and push image
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
platforms: linux/amd64 # x86_64
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
41+
push: true
42+
43+
- uses: actions-hub/kubectl@master
44+
env:
45+
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
46+
with:
47+
args: rollout restart deployment relisten-sonos
48+

0 commit comments

Comments
 (0)