-
Notifications
You must be signed in to change notification settings - Fork 39
56 lines (49 loc) · 1.83 KB
/
update.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
# This workflow automates the deployment of generated files
name: Update generated files
on: workflow_dispatch
jobs:
update:
runs-on: ubuntu-latest
# TODO update once 25-ea is available
strategy:
max-parallel: 1
matrix:
java-version: ['21']
steps:
- name: Checkout source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Checkout branch
id: checkout
run: .github/scripts/checkout.sh update-generated-files-${{ github.sha }}
- name: Generate signatures
#TODO remove -Pstaging once all Jakarta EE 11 dependencies are GA
run: |
mvn install -Pstaging --file api/pom.xml
mvn package -Pstaging -Psignature-generation --file tck/pom.xml
## Add any other automated update steps here
- name: Needs updates
id: update
run: echo "update_count=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
- name: Create commit
if: steps.update.outputs.update_count > 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add tck/src/main/resources/
git commit -m "Update generated files ${{ matrix.java-version }}"
git push origin update-generated-files-${{ github.sha }}
pull-request:
needs: [update]
uses: ./.github/workflows/pull-request.yml
with:
branch: 'update-generated-files-${{ github.sha }}'
title: 'Update generated files'
body: 'generated pull request'