Skip to content

Commit 78cec27

Browse files
NiccoloFeisxd
andauthored
ci: add workflow to automate the refresh of the licenses directory (cloudnative-pg#7214)
Closes cloudnative-pg#5393 Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com> Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com> Co-authored-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
1 parent 50e28ea commit 78cec27

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Refresh the "licenses" directory and create a PR if there are any changes
2+
3+
name: Refresh licenses directory
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "30 0 * * 1"
8+
9+
env:
10+
GOLANG_VERSION: "1.24.x"
11+
12+
jobs:
13+
licenses:
14+
name: Refresh licenses
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: ${{ env.GOLANG_VERSION }}
24+
check-latest: true
25+
26+
- name: Generate licenses
27+
run: |
28+
make licenses
29+
30+
- name: Create Pull Request if licenses have been updated
31+
uses: peter-evans/create-pull-request@v7
32+
with:
33+
token: ${{ secrets.REPO_GHA_PAT }}
34+
title: "chore: refresh licenses directory"
35+
body: "Refresh the licenses directory"
36+
branch: "license-updater"
37+
author: "license-updater <license-updater@users.noreply.github.com>"
38+
add-paths: |
39+
licenses/**
40+
commit-message: "chore: refresh licenses directory"
41+
signoff: true

0 commit comments

Comments
 (0)