← Winnitude! Search  ·  Reader Mode (825 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 82 LINKS

GitHub - playframework/.github

Repository navigation

.github
Public

About

No description, website, or topics provided.

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy Activity Custom properties

Stars

5 stars

Watchers

3 watching

Forks

7 forks Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


206 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
.github .github    
sbt sbt    
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md    
CONTRIBUTING.md CONTRIBUTING.md    
FUNDING.yml FUNDING.yml    
README.md README.md    
RELEASING.md RELEASING.md    
SECURITY.md SECURITY.md    

Repository files navigation

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

The command and binary compatibility workflows use these default dependency repositories for Coursier and sbt, in order. The publishing workflow uses them for Coursier only:

  1. Local Ivy (~/.ivy2/local).
  2. Google's Maven Central mirror .
  3. Maven Central directly, using the default https://repo1.maven.org/maven2/ endpoint.

Coursier uses its built-in central default. sbt uses the same default Central URL explicitly, because its built-in maven-central entry would be reordered ahead of Google. Google is the only additional default repository.

Coursier setup receives the explicit list through customRepositories with disableDefaultRepos: true. COURSIER_REPOSITORIES supplies the same defaults to later Coursier commands. No replacement mirror mappings are installed. App descriptors can add their own repositories.

Maven Central is a fallback for module metadata, not for individual downloads. When Google cannot provide a module's POM, for example because a new release has not reached the mirror yet, resolution falls back to Central. Once Google has served a POM, that module's JARs are downloaded from Google as well, so a failed JAR download is not retried against Central. Google's version listings (maven-metadata.xml) can also lag behind Central. Exact versions are unaffected, but version ranges, latest.release and latest.stable are resolved from the first repository that answers, so they can select an older version until the mirror catches up. latest.integration compares all repositories.

Coursier looks for a module in its cache under every repository before downloading it from any of them, and then downloads the module's missing files from the repository its cached POM came from. A module cached from Central, for example by a cache saved before this change or by the publishing workflow, would therefore keep downloading from Central. After restoring the Coursier cache, all three workflows therefore hard-link cached files between the Central and Google cache paths, as both hosts serve identical files. Every file cached from Google is linked for Central, since Google only serves files Central has. Files cached from Central are linked for Google only if Central published them more than a week ago (Coursier dates cached files with the server's Last-Modified header), as Google may not have mirrored newer releases yet: their missing files would then be requested from Google, without falling back to Central. Coursier's markers for files that were not found, and version listings (maven-metadata.xml), are never linked, as they differ between both hosts.

For sbt, the command and binary compatibility workflows generate a repositories file under RUNNER_TEMP and pass its location through JAVA_TOOL_OPTIONS using sbt.repository.config. They do this after installing sbt and computing the sbt cache keys, because every JVM started afterwards prints Picked up JAVA_TOOL_OPTIONS: ... to stderr ahead of its java -version output, which sbt/setup-sbt parses for its cache key. They leave sbt.override.build.repos unset, so sbt uses the listed defaults and retains repositories declared by each build, including plugin builds and child sbt processes. No Sonatype or Apache snapshot repositories are added globally; projects that need snapshots continue to declare them themselves. Builds that explicitly replace externalResolvers or enable repository overrides can still choose their own repository policy.

The sbt repositories file also retains the four default launcher repositories (sbt-maven-releases, sbt-maven-snapshots, typesafe-ivy-releases and sbt-ivy-snapshots), all marked bootOnly. They are available to the launcher, but excluded from the default build dependency repositories. The workflows' existing /etc/hosts blocks for repo.scala-sbt.org and repo.typesafe.com still apply.

sbt writes the extra repositories into generated POMs unless the build's pomIncludeRepository filter excludes them: sbt 1 writes Google, and sbt 2 also writes the explicitly named maven-central entry. The publishing workflow therefore does not configure sbt repositories, so released POMs keep their previous <repositories> section. If a command workflow's cmd publishes to a remote repository, set its sbt-google-mirror input to false. Local publications (publishLocal, publishM2) contain the extra entries as well, but Coursier ignores <repositories> in POMs when resolving.

Existing dependency caching remains enabled. Gradle and standalone workflows have their own repository configuration. Callers that do not publish remotely from the command workflow need no new inputs; these defaults apply once the shared-workflow reference they use includes this change.

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)
fail-fast 4.2.0 ➖ true Cancel other matrix jobs when one fails
cache-key 2.0.0 ➖ '' Key of custom cache
cache-path 2.0.0 ➖ '' Path of custom cache
sbt-cache-namespace 4.3.0 ➖ '' Job-specific namespace for sbt 2 cache snapshots; empty uses sbt/setup-sbt defaults
sbt-google-mirror 4.4.0 ➖ true Put Google's Maven Central mirror ahead of Central for sbt; set to false when cmd publishes to a remote repository
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

For the custom cache-key/cache-path cache, cmd receives CACHE_HIT_CUSTOM=true only on an exact key match. Commands can check this value before regenerating restored files; a miss, partial match or skipped cache step must still run the producer.

Set sbt-cache-namespace to a distinct name for each job, such as unit-tests, to persist sbt 2's action cache (AC) and content-addressable storage (CAS) in ~/.cache/sbt. An empty namespace keeps the disk cache managed by sbt/setup-sbt.

Snapshots are partitioned by runner OS/architecture, namespace, installed JDK and complete matrix. Keys also include a hash of the sbt build definition and the workflow run ID/attempt, so each successful job saves a fresh snapshot. Restores try the same build definition first, then fall back within the same partition; sbt decides which cached task results can be reused.

Scheduled runs still restore and save build caches. The workflow sets SBT_CACHE_TEST_RESULT=false for scheduled runs so sbt 2 executes tests again; other events use true.

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
sbt-cache-namespace 4.3.0 ➖ '' Job-specific namespace for sbt 2 cache snapshots; empty uses sbt/setup-sbt defaults
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

The optional sbt-cache-namespace input uses the snapshot policy described for the Universal CMD task , with the selected Java version as its matrix dimension. Use a distinct namespace such as binary-check.

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

About

No description, website, or topics provided.

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy Activity Custom properties

Stars

5 stars

Watchers

3 watching

Forks

7 forks Report repository

Releases

Used by

Contributors

Languages