forked from Staffbase/syseleven-exporter
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (47 loc) · 1.92 KB
/
test_build_and_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
name: Test, Build and Deploy
on: [push]
jobs:
test:
name: Test and Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: go mod download
- name: Test
run: go test ./...
- name: Build
run: make build
continuous-delivery:
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
name: Push Docker Image
runs-on: ubuntu-18.04
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Staffbase/gitops-github-action
ref: v1
token: ${{ secrets.GITOPS_TOKEN }}
path: .github/gitops
- name: GitOps (build, push and deploy a new Docker image)
uses: ./.github/gitops
with:
dockerregistry: docker.io
dockerusername: ${{ secrets.DOCKER_USERNAME }}
dockerpassword: ${{ secrets.DOCKER_PASSWORD }}
dockerimage: staffbace/syseleven-exporter
gitopstoken: ${{ secrets.GITOPS_TOKEN }}
gitopsprod: |-
clusters/customization/prod/mothership/syseleven-exporter/syseleven-exporter-cr.yaml spec.template.spec.containers.syseleven-exporter.image
clusters/customization/prod/mothership/syseleven-exporter/syseleven-exporter-dev-cr.yaml spec.template.spec.containers.syseleven-exporter.image
clusters/customization/prod/mothership/syseleven-exporter/syseleven-exporter-stage-cr.yaml spec.template.spec.containers.syseleven-exporter.image
clusters/customization/prod/mothership/syseleven-exporter/syseleven-exporter-prod-cr.yaml spec.template.spec.containers.syseleven-exporter.image