ihostage / .github-play

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Single SBT task

This workflow is used for running a single SBT task. It can to use for running an any BASH script or command, but we don't recommend doing that.

Path: .github/workflows/sbt.yml

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
cmd 1.0.0 - Running command
java 1.0.0 8 AdoptJDK version
scala 1.0.0 '' Scala version
cache-key 1.0.0 '' Key of custom cache
cache-path 1.0.0 '' Path of custom cache
env 1.0.0 '' Custom ENV vars

How to use:

uses: playframework/.github/.github/workflows/sbt.yml@v1
with:
  cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test
  env: |
    VAR_1=value
    VAR_2=value

Java/Scala matrix SBT task

This workflow is used for running an SBT task on matrix of Java/Scala versions.

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

Image: Ubuntu 20.04

Uses actions:

Parameters:

Parameter Since Required Default Description
cmd 1.0.0 - Running command
java 1.0.0 - AdoptJDK version
scala 1.0.0 - Scala version
include 1.0.0 [] Matrix include's
exclude 1.0.0 [] Matrix exclude's
cache-key 1.0.0 '' Key of custom cache
cache-path 1.0.0 '' Path of custom cache
env 1.0.0 '' Custom ENV vars

How to use:

uses: playframework/.github/.github/workflows/sbt-matrix.yml@v1
with:
  java: >-
    [ "11", "8" ]
  scala: >-
    [ "2.12.15", "2.13.8", "3.0.2" ]
  cmd: sbt "-Dvar1=$VAR_1" "-Dvar2=$VAR_2" ++$SCALA_VERSION test
  env: |
    VAR_1=value
    VAR_2=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

GitHub Actions Starter workflows

TODO

About