Skip to content

Latest commit

 

History

History
170 lines (114 loc) · 7.07 KB

README.md

File metadata and controls

170 lines (114 loc) · 7.07 KB

Playframework GitHub integration

This repository contains a few configurations of GitHub features. For example a Reusing workflows or Starter workflows as GitHub Actions features.

GitHub Actions Reusing Workflows

Universal CMD task

This workflow is used for running any CMD task on matrix of Java versions and other dimensions.

Every matrix dimension will be access by environment variable like MATRIX_$(uppercase(dimension_name)) (for example MATRIX_JAVA).

Path: .github/workflows/sbt-matrix.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
cmd 2.0.0 - Running command
java 2.0.0 8 AdoptJDK version (space/comma delimited list)
scala 2.0.0 '' Scala version (space/comma delimited list)
add-dimensions 2.0.0 '' Other matrix dimensions (json object)
include 2.0.0 [] Matrix include's (json object array)
exclude 2.0.0 [] Matrix exclude's (json object array)
cache-key 2.0.0 '' Key of custom cache
cache-path 2.0.0 '' Path of custom cache
env 2.0.0 '' Custom ENV vars

How to use:

uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
  java: 11, 8
  scala: 2.12.15, 2.13.8, 3.0.2
  add-dimensions: >-
    {
      "color": [ "red", "green"]
    }
  cmd: sbt "-Dcustom_var=$CUSTOM_VAR" "-Dcolor=$MATRIX_COLOR" "-Djava=$MATRIX_JAVA" ++$MATRIX_SCALA test
  env: |
    CUSTOM_VAR=value

Publishing to Sonatype

This workflow is used for publishing snapshots artifacts to Sonatype Snapshots repository or release artifacts to Maven Central.

⚠️ For using this workflow project must uses the CI Release plugin.

Path: .github/workflows/publish.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
java 1.0.0 8 AdoptJDK version

Secrets:

Secret Since Required Default Description
username 1.0.0 - Sonatype account username
password 1.0.0 - Sonatype account password
pgp_passphrase 1.0.0 - Password for GPG key
pgp_secret 1.0.0 - Base64 of GPG private key

How to use:

uses: playframework/.github/.github/workflows/publish.yml@v1
secrets:
  username: ${{ secrets.SONATYPE_USERNAME }}
  password: ${{ secrets.SONATYPE_PASSWORD }}
  pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }}
  pgp_secret: ${{ secrets.PGP_SECRET }}

Validate Binary Compatibility

This workflow is used for validate binary compatibility the current version.

⚠️ For using this workflow project must uses the SBT MiMa plugin.

Path: .github/workflows/binary-check.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
java 1.0.0 8 AdoptJDK version

How to use:

uses: playframework/.github/.github/workflows/binary-check.yml@v1

Mark Pull Request as Ready To Merge

This workflow is used for mark pull request as ready to merge and should be last in the workflows chain.

⚠️ For using this workflow don't forget to configure the needs (GA docs) attribute to make this workflow run last.

Path: .github/workflows/rtm.yml

Image: Ubuntu 20.04

No Parameters

How to use:

needs: # Should be latest
  - "check-code-style"
  - "..."
  - "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v1

Clear Cache

This workflow is used for clearing cache. Run this workflow manually from Actions page.

Path: .github/workflows/sbt.yml

Image: Ubuntu 20.04

Uses actions:

No Parameters

How to use:

uses: playframework/.github/.github/workflows/trigger-cache-invalidation.yml@v1

GitHub Actions Starter workflows

TODO