-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (46 loc) · 1.71 KB
/
microk8s-kata.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
name: Kata Containers on MicroK8s
on:
#push:
#schedule:
# - cron: '0 1 * * MON,THU'
workflow_dispatch:
inputs:
workflowAction:
description: 'Action'
default: 'Run MicroK8s + Kata Containers'
required: true
jobs:
microk8s-kata-containers:
runs-on: ubuntu-20.04
steps:
- name: Check environment
run: |-
lsb_release -a
- name: Checkout
uses: actions/checkout@v2
- name: Setup gcloud CLI
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Get gcloud version & info
run: |-
echo '--- gcloud components update ---'
gcloud components update
echo '--- gcloud version ---'
gcloud version
- name: install MicroK8s + Kata Containers
env:
KATA_GCE_DELETE: true
GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
run: |-
bash sh/microk8s-kata.sh
- name: commit back changed files
run: |
git add -A
git config --local user.name "Github Action from $GITHUB_ACTOR"
git config --local user.email "[email protected]"
git diff --quiet && git diff --staged --quiet || git commit -m "changes committed back by actor $GITHUB_ACTOR on $HELMALYZER_TIMESTAMP (workflow: $GITHUB_WORKFLOW - job: $GITHUB_JOB - sha: $GITHUB_SHA - ref: $GITHUB_REF)"
git config pull.rebase false
git diff --quiet && git diff --staged --quiet || git pull
git push https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY