generated from BCDevOps/opendev-template
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (42 loc) · 1.39 KB
/
publish-clamav.yml
File metadata and controls
48 lines (42 loc) · 1.39 KB
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
name: Build and Publish ClamAV Image
on:
# run on pushs to main
push:
branches:
- main
paths:
- .github/workflows/publish-clamav.yml
- devops/docker/clamav/**
- helm/_clamav/** #trigger on chart changes.
# can manually run
workflow_dispatch:
env:
GITHUB_REGISTRY: ghcr.io
IMAGE_NAME: bcgov/hesp-clamav
jobs:
build-push-clamav:
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Grab appVersion from the subchart
- id: chart-version
run: |
echo "appVersion=$(yq '.appVersion' helm/_clamav/Chart.yaml)" >> $GITHUB_OUTPUT
# Build & Push image with multiple tags
- name: Build and Push
uses: egose/actions/docker-build-push@46d589997e49cae4a8a3d06644ae8b04351a30f2
with:
registry-url: ${{ env.GITHUB_REGISTRY }}
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
image-name: ${{ env.IMAGE_NAME }}
docker-context: devops/docker/clamav
docker-file: devops/docker/clamav/Dockerfile
metadata-tags: |
type=ref,event=branch # → :main
type=sha,format=short # → :abcd123
type=raw,value=${{ steps.chart-version.outputs.appVersion }} # → :1.0.0