-
Notifications
You must be signed in to change notification settings - Fork 86
59 lines (51 loc) · 1.67 KB
/
update-clair.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
57
58
59
on:
push:
tags:
- v*.*.*
name: Create PR for Clair
jobs:
send-pull-requests:
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
tag=`basename ${{ github.ref }}`
branch="chore-update-claircore-to-${tag}"
echo "VERSION=${tag}" >> $GITHUB_ENV
echo "BRANCH=${branch}" >> $GITHUB_ENV
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CLAIR_APP_ID }}
private_key: ${{ secrets.CLAIR_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
repository: quay/clair
- name: Update claircore
run: |
# Update the script files to the latest version.
go get github.com/quay/claircore@${{ env.VERSION }}
go mod tidy
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
add-paths: go.mod,go.sum
token: ${{ steps.generate_token.outputs.token }}
base: main
commit-message: |
chore: update claircore to ${{ env.VERSION }}
Update claircore to latest release.
committer: Claircore-CI <${{ github.actor }}@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: ${{ env.BRANCH }}
delete-branch: true
title: 'chore: update claircore to ${{ env.VERSION }}'
body: |
Update claircore to latest release.
labels: |
automated