Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe - Extract reusable workflow #76

Open
aalmiray opened this issue Apr 7, 2023 · 2 comments
Open

Recipe - Extract reusable workflow #76

aalmiray opened this issue Apr 7, 2023 · 2 comments
Labels

Comments

@aalmiray
Copy link

aalmiray commented Apr 7, 2023

Given a set of similar workflows such as those found at https://github.com/asyncer-io/r2dbc-mysql/tree/f4ca1652219074c337d7db12d2572686da2c3a64/.github/workflows where 3 workflows are almost identical except for 1 property

  • mysql5-5.yml
  • mysql5-6.yml
  • mysql5-7.yml
name: MySQL 5.7

on: [ pull_request ]

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
      - name: Set up Temurin 8
        uses: actions/setup-java@v3
        with:
          distribution: temurin
          java-version: 8
          cache: maven
      - name: Shutdown the Default MySQL
        run: sudo service mysql stop
      - name: Set up MySQL 5.7
        uses: asyncer-io/mysql-action@trunk
        with:
          # THIS IS THE SINGLE VALUE THAT'S DIFFERENT
          mysql version: 5.7
          mysql database: r2dbc
          mysql root password: r2dbc-password!@
      - name: Integration test with MySQL 5.7
        run: ./mvnw -B verify -Dmaven.javadoc.skip=true -Dmaven.surefire.skip=true -Dtest.mysql.password=r2dbc-password!@ -Dtest.mysql.version=5.7 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
@sambsnyd
Copy link
Member

sambsnyd commented Apr 8, 2023

Is what you're asking for a recipe which analyzes many different workflows, keeps the commonalities, and parameterizes the differences? That sounds quite complex to solve in the general case.

@sambsnyd sambsnyd added the recipe label Apr 8, 2023
@sambsnyd sambsnyd moved this to Backlog in OpenRewrite Apr 8, 2023
@sambsnyd sambsnyd moved this from Backlog to Recipes Wanted in OpenRewrite Apr 8, 2023
@aalmiray
Copy link
Author

aalmiray commented Apr 8, 2023

Yes, that's an accurate summary 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants