-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (52 loc) · 1.72 KB
/
manual-deploy-unstable.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
name: Manual Deploy Unstable
on:
workflow_dispatch:
inputs:
deploy_environment:
description: 'namespace to deploy to'
required: true
type: choice
default: "testing"
options:
- "testing"
- "staging"
tag:
description: tag
required: true
jobs:
build-unstable:
name: Build unstable ${{ github.event.inputs.tag }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-unstable.yml@v1
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: Dockerfile
secrets: inherit
scan-image:
needs: build-unstable
runs-on: ubuntu-latest
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ needs.build-unstable.outputs.image }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
# skip-files: '/gems/ruby/3.2.0/gems/openid_connect-2.2.0/spec/mock_response/public_keys/private_key.pem'
deploy:
needs: build-unstable
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.deploy_environment }}
steps:
- name: Deploy to ${{ github.event.inputs.deploy_environment }}
uses: mlibrary/deploy-to-kubernetes@v3
with:
registry_token: ${{ secrets.GITHUB_TOKEN }}
image: ${{ needs.build-unstable.outputs.image }}
cluster_ca: ${{ secrets.HATCHER_CLUSTER_CA }}
cluster_server: https://hatcher.kubernetes.lib.umich.edu
namespace_token: ${{ secrets.HATCHER_TOKEN }}
namespace: ${{ secrets.NAMESPACE }}