-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (59 loc) · 1.65 KB
/
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
60
61
62
63
64
65
66
67
68
69
name: Deployments
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
id-token: write
packages: write
pages: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
containers:
name: ${{ matrix.context }}
runs-on: ubuntu-latest
strategy:
matrix:
context: [resonator, medium]
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: node
uses: actions/setup-node@v3
- name: buildx
uses: docker/setup-buildx-action@v2
- id: string
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}
- name: login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build
uses: docker/build-push-action@v4
with:
file: Dockerfile.${{ matrix.context }}
push: true
tags: ghcr.io/${{ steps.string.outputs.lowercase }}-${{ matrix.context }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: publish
uses: deploys-app/deploys-action@v1
with:
project: ${{ secrets.DEPLOYS_NAME }}
location: gke.cluster-rcf2
name: dorothy-${{ matrix.context }}
image: ghcr.io/${{ steps.string.outputs.lowercase }}-${{ matrix.context }}
minReplicas: 2
maxReplicas: 20
env:
DEPLOYS_AUTH_USER: ${{ secrets.DEPLOYS_AUTH_USER }}
DEPLOYS_AUTH_PASS: ${{ secrets.DEPLOYS_AUTH_PASS }}