-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.33 KB
/
cve-patch-images.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
58
59
name: CVE patch
on:
workflow_dispatch:
inputs:
images:
description: 'Images to patch'
type: string
required: true
repository_dispatch:
types: [ patch-images ]
permissions:
packages: write
jobs:
patch_images:
runs-on:
- self-hosted
- large
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_READ_ONLY_USERNAME }}
password: ${{ secrets.DOCKERHUB_READ_ONLY_PASSWORD }}
- name: Save images
id: save-images
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
{
echo 'images<<EOF'
echo "${{ inputs.images }}"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
else
{
echo 'images<<EOF'
echo "${{ github.event.client_payload.images }}"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
fi
- name: Patch images
id: patch-images
uses: ./.github/actions/copacetic-action
with:
images: ${{ steps.save-images.outputs.images }}
github-token: ${{ secrets.GITHUB_TOKEN }}
timeout: 2h
report-cves: true