Update the Old GroupId migrations CSV #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 "41898282+github-actions[bot]@users.noreply.github.com" | |
git config user.name "github-actions[bot]" | |
- name: Create timestamp | |
run: echo "NOW=$(date +'%Y-%m-%dT%H%M')" >> $GITHUB_ENV | |
- name: Commit and push | |
run: | | |
git diff-index --quiet HEAD src/main/resources/migrations.csv || (git commit -m "[Auto] Old GroupId migrations as of ${{ env.NOW }}" src/main/resources/migrations.csv && git push origin main) |