-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (40 loc) · 1.34 KB
/
migrations.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
---
name: Update the Old GroupId migrations CSV
on:
workflow_dispatch: {}
schedule:
- cron: 0 10 * * MON
jobs:
update-migrations:
if: github.event_name != 'schedule' || github.repository_owner == 'openrewrite'
runs-on: ubuntu-latest
steps:
# Checkout and build parser
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
cache: 'gradle'
distribution: 'temurin'
java-version: '17'
# Update migrations
- name: Checkout oga-maven-plugin
uses: actions/checkout@v4
with:
repository: jonathanlermitage/oga-maven-plugin
path: oga-maven-plugin
- name: Update migrations
run: ./gradlew parseDefinitionMigrations --args="./oga-maven-plugin src/main/resources/migrations.csv"
# Commit and push
- name: configure-git-user
run: |
git config user.email "[email protected]"
git config user.name "team-moderne[bot]"
- name: Create timestamp
run: echo "NOW=$(date +'%Y-%m-%dT%H%M')" >> $GITHUB_ENV
- name: Commit and push
run: |
git add src/main/resources/migrations.csv
git diff --quiet HEAD || (git commit -m "[Auto] Old GroupId migrations as of ${{ env.NOW }}" && git push origin main)