-
Notifications
You must be signed in to change notification settings - Fork 25
48 lines (40 loc) · 1.43 KB
/
deployer.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
name: Workflow
on:
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-deployer-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build-and-release:
name: "Build"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Check out Code
uses: actions/checkout@v3
- name: Read .nvmrc
id: node_version
run: echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NVMRC }}
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install Dependencies
continue-on-error: false
run: |
yarn set version stable
yarn install --frozen-lockfile --immutable
- name: Log in to private Docker registry
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
- name: Build Storybook
run: |
yarn build-storybook
docker buildx build --platform linux/amd64 --push -t registry.min.dev/minio/mds .
echo "${{ secrets.MDS_DEPLOYER_KUBECONFIG }}" > /tmp/kubecconfig
ls -l /tmp/kubecconfig
kubectl --kubeconfig /tmp/kubecconfig -n mds delete pod $(kubectl --kubeconfig /tmp/kubecconfig -n mds get pods | grep mds | awk '{print $1}')