-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.1 KB
/
deploy-expiration.yaml
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
name: deploy-expiration
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'ticketing/expiration/**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '21.7.x'
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- run: npm install
working-directory: ./ticketing/expiration
- run: npm run build
working-directory: ./ticketing/expiration
- run: docker build -t giammarcoboscaro/ticketing-expiration .
working-directory: ./ticketing/expiration
- run: docker push giammarcoboscaro/ticketing-expiration
- uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- run: doctl kubernetes cluster kubeconfig save udemy-microservices-ticketing-app
- run: kubectl rollout restart deployment expiration-deploy