-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.91 KB
/
vultr-ci.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
66
67
68
69
70
71
---
name: Vultr Build & Deployment
on:
push:
branches:
- feat/deployment
env:
DEPLOYMENT_FILE: das-function.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup OpenFaaS
run: curl -sSL https://cli.openfaas.com | sudo -E sh
- name: Checkout
uses: actions/checkout@v4
with:
path: das-servless-functions
- name: Checkout das-infra-stack-vultr Repository
uses: actions/checkout@v4
with:
repository: singnet/das-infra-stack-vultr
path: das-infra-stack-vultr
ref: master
- name: Pull template
working-directory: ./das-infra-stack-vultr
run: faas-cli template store pull python3
- name: Run shrinkwrap build
working-directory: ./das-infra-stack-vultr
run: faas-cli build -f ${{ env.DEPLOYMENT_FILE }}
- name: Login to DockerHub
if: success()
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Image to Registry
working-directory: ./das-infra-stack-vultr
run: faas-cli push -f ${{ env.DEPLOYMENT_FILE }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup OpenFaaS
run: curl -sSL https://cli.openfaas.com | sudo -E sh
- name: Checkout das-infra-stack-vultr Repository
uses: actions/checkout@v4
with:
repository: singnet/das-infra-stack-vultr
path: das-infra-stack-vultr
ref: master
- name: Login to OpenFaaS Gateway
working-directory: ./das-infra-stack-vultr
run: faas-cli login -p ${{ secrets.OPENFAAS_GATEWAY_PASSWD }} \
-g ${{ secrets.OPENFAAS_GATEWAY }}
- name: Deploy the function
working-directory: ./das-infra-stack-vultr
run: faas-cli deploy -f ${{ env.DEPLOYMENT_FILE }}