forked from refinedev/refine
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 2.06 KB
/
store-deploy.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
name: store Release
on:
push:
branches:
- master
paths:
- "examples/store/**"
- ".github/workflows/store-deploy.yml"
jobs:
store-deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-store-deploy
cancel-in-progress: true
strategy:
matrix:
node-version: [18.x]
steps:
- name: Workflow run cleanup action
uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: client docker build
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
repository: refinedev/refine/refine-store
tag_with_sha: true
dockerfile: examples/store/Dockerfile
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: AWS EKS kubeconfig
run: |
aws eks --region eu-west-1 update-kubeconfig --name refine
- name: Get nodes
run: kubectl get nodes
- name: Deploy refine-store to k8s
run: |
cd examples/store
mv ./k8s/refine-store/Chart.yaml ./k8s/refine-store/Chart.old.yaml &&
cat ./k8s/refine-store/Chart.old.yaml | grep -v appVersion > ./k8s/refine-store/Chart.yaml &&
echo -e "\r\nappVersion: sha-${GITHUB_SHA::7}\r\n" >> ./k8s/refine-store/Chart.yaml &&
cat ./k8s/refine-store/Chart.yaml
helm upgrade refine-store ./k8s/refine-store --install --atomic --values=./k8s/refine-store/values.yaml \
--set NEXT_PUBLIC_STRIPE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_KEY }} \