-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.59 KB
/
ci.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: deploy
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
PROJECT_ID: twingate-labs
REGION: europe-west2
GAR_LOCATION: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/
jobs:
build_release:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dockerfile: ./dockerfile-kasm-chrome
image: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/tg-chrome
- dockerfile: ./dockerfile-kasm-ubuntu-jammy-desktop
image: europe-west2-docker.pkg.dev/twingate-labs/tg-agentless-images/tg-desktop
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: "Use gcloud CLI"
run: "gcloud info"
- name: "Docker auth"
run: |-
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet
- name: Put current date into a variable
run: |
echo "NOW=$NOW" >> $env:GITHUB_ENV
- name: Build image
run: |
NOW=$(date "+%Y%m%d")
docker build . --file ${{ matrix.dockerfile }} --tag ${{ matrix.image }}:dev --tag ${{ matrix.image }}:latest --tag ${{ matrix.image }}:$NOW
# - name: Build image
# run: |
# docker image ls
# echo ${{ matrix.image }}
- name: Push image
run: docker push ${{ matrix.image }} --all-tags