-
Notifications
You must be signed in to change notification settings - Fork 14
100 lines (87 loc) · 2.68 KB
/
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Skaffold
on:
push:
paths:
- src/**
- .github/workflows/ci.yml
- action.yml
jobs:
build:
name: Skaffold Build
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache layers
uses: actions/cache@v3
with:
path: "${{ github.workspace }}/.skaffold/cache"
key: skaffold-${{ hashFiles('**/cache') }}
restore-keys: |
skaffold-
- name: Run Skaffold pipeline as command
uses: hiberbee/github-action-skaffold@latest
id: build
with:
command: build
working-directory: test
skip-tests: false
repository: ${{ secrets.SKAFFOLD_DEFAULT_REPO }}
- name: Run Skaffold with output to JSON
uses: hiberbee/github-action-skaffold@latest
with:
command: build
file-output: tags.json
repository: ${{ secrets.DOCKER_REPOSITORY }}
working-directory: test
- name: Read JSON file output
run: cat tags.json
working-directory: test
- name: Read JSON step output
run: echo '${{ steps.build.outputs.output }}'
run:
name: Skaffold Run
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Minikube
uses: hiberbee/[email protected]
with:
addons: registry
- name: Setup Helm
uses: hiberbee/[email protected]
with:
repository-config: test/repositories.yaml
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_REPOSITORY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}\
- name: Cache layers
uses: actions/cache@v3
with:
path: "{{ github.workspace }}/.skaffold/cache"
key: skaffold-${{ hashFiles('**/cache') }}
restore-keys: |
skaffold-
- name: Run Skaffold pipeline as action
uses: hiberbee/github-action-skaffold@latest
with:
command: run
cache: false
insecure-registries: localhost:5000
namespace: default
repository: ${{ secrets.DOCKER_REPOSITORY }}
verbosity: info
working-directory: test
- name: Run Skaffold with output to file
uses: hiberbee/github-action-skaffold@latest
with:
command: build
file-output: tags.json
repository: ${{ secrets.DOCKER_REPOSITORY }}
working-directory: test
- name: Get Helm releases
run: helm list