This repository was archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 2 KB
/
generate.yaml
File metadata and controls
61 lines (58 loc) · 2 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Monthly generate
on:
schedule:
- cron: '0 0 1 * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
recursive: true
- name: Update submodules
run: git submodule update --init --recursive
- name: Check for submodule updates
if: ${{ !env.ACT }} # To avoid quitting the job assuming that you want to run the generation part
run: |
git submodule update --remote --merge
! git diff-index --quiet HEAD && { echo "No submodule updates found"; exit 1; }
- name: Download java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Generate
run: |
./generate.sh
- uses: actions/setup-go@v4
with:
go-version: '1.20.2'
- name: Go mod update
run: go mod tidy
- name: Create Pull Request
if: ${{ !env.ACT }}
uses: peter-evans/create-pull-request@v4
with:
commit-message: Generate new go pkg according to specification update
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: update
title: '[Update] Update according to specification updates'
body: |
Update report
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
update
specs
automated pr
assignees: 5GCoreNet/maintainers
reviewers: 5GCoreNet/maintainers
- name: Check outputs
if: ${{ !env.ACT && steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"