Skip to content

Recipe - Extract reusable workflow #76

Description

@aalmiray

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions