-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (44 loc) · 1.41 KB
/
clamav.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
name: ClamAV - Install/Upgrade/Remove
run-name: ClamAV - ${{ inputs.environment }} ClamAV in ${{ inputs.environment }} using ${{ github.ref_name }}
on:
workflow_dispatch:
inputs:
environment:
description: "Environment"
required: true
type: environment
action:
description: "Action"
required: true
type: choice
options:
- install
- upgrade
- uninstall
clamavImageTag:
description: "ClamAV Image Tag"
required: true
default: "main"
jobs:
manageClamav:
name: ${{ inputs.environment }} ClamAV in ${{ inputs.environment }}
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
NAMESPACE: ${{ secrets.OPENSHIFT_ENV_NAMESPACE }}
steps:
- name: Checkout Target Branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4"
- name: Log in to OpenShift
run: |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }}
- name: Manage ClamAV
working-directory: "./devops/helm/clam-av/main/"
run: |
make ${{ inputs.action }} NAMESPACE=${{ secrets.OPENSHIFT_ENV_NAMESPACE }} IMAGE_TAG=${{ inputs.clamavImageTag }}