Skip to content

Commit 6948793

Browse files
committed
Updated workflows for deployments
1 parent 0d6da8c commit 6948793

File tree

2 files changed

+63
-10
lines changed

2 files changed

+63
-10
lines changed

.github/workflows/node.js.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ name: Build Status
66
on:
77
push:
88
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
119

1210
jobs:
1311
build:
@@ -23,12 +21,35 @@ jobs:
2321
- uses: actions/checkout@v2
2422
- uses: pnpm/action-setup@v2
2523
with:
26-
version: 9
27-
- name: Use Node.js ${{ matrix.node-version }}
28-
uses: actions/setup-node@v4
24+
version: 10
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Setup Tailscale
29+
uses: tailscale/github-action@v3
30+
with:
31+
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
32+
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
33+
tags: tag:ci
34+
35+
- name: Build Docker image
36+
uses: docker/build-push-action@v4
2937
with:
30-
node-version: ${{ matrix.node-version }}
31-
cache: 'pnpm'
32-
- run: pnpm install --frozen-lockfile
33-
- run: npm run bands
34-
- run: npm run build
38+
context: .
39+
push: false
40+
load: true
41+
tags: relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest
42+
43+
- name: Push to registry over Tailscale network
44+
run: |
45+
docker push relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest
46+
47+
- name: Install kubectl
48+
uses: azure/setup-kubectl@v3
49+
50+
- name: Restart Kubernetes deployment
51+
run: |
52+
kubectl --server=https://relisten2.tail09dbf.ts.net:6443 \
53+
--insecure-skip-tls-verify=true \
54+
--token=${{ secrets.KUBE_API_TOKEN }} \
55+
rollout restart deployment relisten-web

.github/workflows/prs.js.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Build Status
5+
6+
on:
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [22.x]
18+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: pnpm/action-setup@v2
23+
with:
24+
version: 10
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'pnpm'
30+
- run: pnpm install --frozen-lockfile
31+
- run: npm run bands
32+
- run: npm run build

0 commit comments

Comments
 (0)