-
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (56 loc) · 2.04 KB
/
dev.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
name: Dev Deployment
on:
push:
branches:
- dev
jobs:
package:
runs-on: ubuntu-latest
env:
IMAGE: docker.pkg.github.com/cocreate-app/cocreatews/cocreatews
VERSION: dev
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: npm login
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: >
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
.npmrc
- name: Login docker registry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
run: |
docker login docker.pkg.github.com -u ${GITHUB_ACTOR} -p ${GITHUB_TOKEN}
- name: Build docker image
run: docker build . -t ${IMAGE}:dev
- name: Push docker image
run: |
docker push ${IMAGE}:dev
# deploy:
# runs-on: ubuntu-latest
# needs:
# - package
# env:
# VERSION: dev
# KUBECONFIG_FILE: ${{ secrets.KUBECONFIG_DEV }}
# KUBECONFIG: kubeconfig
# steps:
# - name: Checkout repository
# uses: actions/checkout@v1
# - name: Get kubectl
# run: |
# curl -LO https://dl.k8s.io/release/v1.20.0/bin/linux/amd64/kubectl
# chmod +x kubectl
# - name: Save kubeconfig
# env:
# KUBECONFIG_FILE: ${{ secrets.KUBECONFIG_DEV }}
# run: |
# echo ${KUBECONFIG_FILE} | base64 -d > ${KUBECONFIG}
# - name: Apply deployment
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB }}
# run: |
# sed -i "s/IMAGE_TAG/${VERSION}/g" manifests/kustomization.yaml
# ./kubectl kustomize manifests/ | ./kubectl apply -f -