Update the Old GroupId migrations CSV #30
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 11 * * 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 | |
- uses: actions/setup-java@v4 | |
with: | |
cache: 'gradle' | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Create jar and copy dependencies | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
arguments: jar deps | |
# 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: java -classpath "build/deps/*:build/libs/*" org.openrewrite.java.dependencies.oldgroupids.ParseDefinitionMigrations oga-maven-plugin src/main/resources/migrations.csv | |
# Create pull request | |
- name: Timestamp | |
run: echo "NOW=$(date +'%Y-%m-%dT%H%M')" >> $GITHUB_ENV | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
base: main | |
branch: migrations/${{ env.NOW }} | |
title: "[Auto] Old GroupId migrations as of ${{ env.NOW }}" | |
body: | | |
[Auto] Old GroupId migrations as of ${{ env.NOW }}. | |
commit-message: "[Auto] Old GroupId migrations as of ${{ env.NOW }}" | |
labels: enhancement | |
- name: Check outputs | |
if: ${{ 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 }}" |