Skip to content

playframework/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playframework GitHub integration

Twitter Follow Discord GitHub Discussions StackOverflow YouTube Twitch Status OpenCollective

Repository size Scala Steward badge Mergify Status

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/cmd.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
ref 2.0.0 '' Branch, tag or SHA for checkout
cmd 2.0.0 - Running command
java 2.0.0 17 AdoptJDK version (space/comma delimited list)
java-index 3.3.1 '' URL to JVM index source file
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
run-scheduled-in-forks 3.1.1 false Run by schedule in fork
gradle-build-root 3.3.0 '' Directory for Gradle builds
ignore-job-coursier-cache 3.4.0 true ignoreJob parameter for Coursier Cache
ignore-matrix-coursier-cache 3.4.0 true ignoreMatrix parameter for Coursier Cache
extra-coursier-cache-key 3.4.0 '' extraKey parameter for Coursier Cache

How to use:

uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
  java: 17, 21
  java-index: https://url/of/your/index.json
  scala: 2.12.19, 2.13.13, 3.3.1
  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
ref 2.0.0 '' Branch, tag or SHA for checkout
java 1.0.0 17 AdoptJDK version
java-index 3.3.1 '' URL to JVM index source file
cmd 3.3.0 sbt ci-release Running command
gradle-build-root 3.3.0 '' Directory for Gradle builds
ignore-job-coursier-cache 3.4.0 true ignoreJob parameter for Coursier Cache
extra-coursier-cache-key 3.4.0 '' extraKey parameter for Coursier Cache

How to use:

uses: playframework/.github/.github/workflows/publish.yml@v3

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
ref 2.0.0 '' Branch, tag or SHA for checkout
java 1.0.0 17 AdoptJDK version
java-index 3.3.1 '' URL to JVM index source file
run-scheduled-in-forks 3.1.1 false Run by schedule in fork
ignore-job-coursier-cache 3.4.0 true ignoreJob parameter for Coursier Cache
extra-coursier-cache-key 3.4.0 '' extraKey parameter for Coursier Cache

How to use:

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

Validate Gradle Wrapper

This workflow is used to validate the checksums of Gradle Wrapper JAR files present in the source tree and fails if unknown Gradle Wrapper JAR files are found.

Path: .github/workflows/gradle-wrapper-validation.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
ref 3.3.0 '' Branch, tag or SHA for checkout

How to use:

uses: playframework/.github/.github/workflows/gradle-wrapper-validation.yml@v3

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@v3

Generate documentation with Antora

This workflow is used for generate and optionally publish documentation with Antora.

Path: .github/workflows/antora.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
path 3.1.0 ./ Path with docs
playbook 3.1.0 local-antora-playbook.yml Playbook file name
publish 3.1.0 false Publish to GH Pages
run-scheduled-in-forks 3.1.1 false Run by schedule in fork

How to use:

uses: playframework/.github/.github/workflows/antora.yml@v3

GitHub Actions Starter workflows

TODO