-
Notifications
You must be signed in to change notification settings - Fork 96
65 lines (64 loc) · 2.21 KB
/
Copy pathupdateTarget.yml
File metadata and controls
65 lines (64 loc) · 2.21 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
62
63
64
65
name: Update Target Platform
on:
workflow_call:
inputs:
author:
description: Defines the committer / author that should be used for the commit
required: false
type: string
default: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
path:
description: Defines the path where the target file to update is located
required: true
type: string
branch:
description: The branch, tag or SHA to checkout
required: false
type: string
default: ''
secrets:
token:
description: Personal Access Token to use for creating pull-requests
required: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
ref: ${{ inputs.branch }}
- name: Set up Maven
uses: stCarolas/setup-maven@12eb41b233df95d49b0c11fc1b5bc8312e5d4ce0 # v5.1
with:
maven-version: 3.9.16
- name: Set up JDK
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Update Target Platform
working-directory: ${{ inputs.path }}
run: >-
mvn -ntp --non-recursive tycho-version-bump:update-target@update-target
- name: Create PR description file if missing
if: ${{ hashFiles(format('{0}/target/targetUpdates.md', inputs.path)) == '' }}
working-directory: ${{ inputs.path }}
run: |
mkdir -p target
echo '## Everything is up to date' > target/targetUpdates.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: Update target-platform with latest version
branch: update_target
title: Dependency Updates
body-path: ${{ inputs.path }}/target/targetUpdates.md
delete-branch: true
draft: false
token: ${{ secrets.token }}
committer: ${{ inputs.author }}
author: ${{ inputs.author }}
add-paths: |
**/*.target