A collection of reusable GitHub Actions composite actions for Akka projects.
setup_global_resolver— configure sbt, Maven, and Gradle to resolve dependencies from the Akka repositoryverify_pom— keep checked-in, sbt-generatedpom.xmlfiles in syncartifact_bom_validation— fail the build when the artifact BOM is out of sync
Globally configures sbt, Maven, and Gradle to resolve dependencies from the Akka repository. Use this in CI workflows to inject Akka resolvers without modifying individual project source files.
- Injects Akka release and snapshot repository URLs into global config files for sbt, Maven, and Gradle
- Optionally configures Sonatype Maven Central deployment credentials from environment variables
- Configures a Maven HTTP blocker to prevent insecure repository connections
- Optionally sets up sbt scripted test resolvers for plugin development
It writes to the following locations on the runner:
| Build tool | File |
|---|---|
| sbt | ~/.sbt/1.0/resolvers.sbt |
| sbt scripted tests | global/resolvers.sbt for each test case under the plugin's src/sbt-test |
| Gradle | ~/.gradle/init.d/akka-resolvers.init.gradle |
| Maven | ~/.m2/settings.xml |
Run this after
actions/setup-java.setup-javagenerates its own~/.m2/settings.xml, so if it runs after this action it will overwrite the Akka Maven configuration. Always placesetup-java— and any other step that writes~/.m2/settings.xml— before this action.
Reference the action directly in your workflow using the akka/github-actions-scripts/setup_global_resolver path:
- name: Setup Global Akka Resolver
uses: akka/github-actions-scripts/setup_global_resolver@mainNo checkout of this repository is required.
| Input | Required | Default | Description |
|---|---|---|---|
sbt-plugin-project-name |
No | '' |
The name of the sbt plugin project directory. When provided, configures resolvers for each sbt-test scripted test case found under that project. |
maven-mirror-control |
No | '' |
Set to NO_MIRROR to skip injecting <mirrors> into Maven settings.xml. Required for projects using protoc, which manages its own resolver and does not handle mirrored repositories. Note: this also disables the Maven HTTP blocker, since it lives inside the same <mirrors> block. |
Set these as GitHub Actions secrets/variables if you need Sonatype deployment or GPG signing. All three must be set together — if any one is missing, the publishing configuration is skipped entirely:
| Variable | Description |
|---|---|
SONATYPE_USERNAME |
Sonatype / Maven Central username |
SONATYPE_PASSWORD |
Sonatype / Maven Central password or token |
PGP_PASSPHRASE |
GPG signing passphrase |
Standard library (no scripted tests):
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Global Akka Resolver
uses: akka/github-actions-scripts/setup_global_resolver@mainsbt plugin project (enables scripted test resolver setup):
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Global Akka Resolver
uses: akka/github-actions-scripts/setup_global_resolver@main
with:
sbt-plugin-project-name: 'my-sbt-plugin'Project using protoc (disables Maven mirrors):
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Global Akka Resolver
uses: akka/github-actions-scripts/setup_global_resolver@main
with:
maven-mirror-control: 'NO_MIRROR'Full example with all options and credentials:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Global Akka Resolver
uses: akka/github-actions-scripts/setup_global_resolver@main
with:
sbt-plugin-project-name: 'my-sbt-plugin'
maven-mirror-control: 'NO_MIRROR'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}Verifies that checked-in, sbt-generated pom.xml files are in sync with the build. Use this to catch dependency changes that were generated but not committed.
sbt-generated *.pom files change on every build — the version string differs and they carry a <repositories> section — which makes them impossible to diff directly. This action normalizes them into a stable form and then fails if the committed copies are out of date:
- Copies each
*.pomfound in the repo togenerated-poms/<artifact-name>/pom.xml. - Normalizes it — the
<version>is replaced with a fixed1.0.0-SNAPSHOTand the<repositories>section is removed — so the file only changes when the dependency structure actually changes. - Fails the job if this produces a git diff, which means the committed
generated-poms/are stale.
None.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Generate poms
run: sbt makePom
- name: Verify poms are in sync
uses: akka/github-actions-scripts/verify_pom@mainWhen this action fails, regenerate the normalized poms and commit them:
sbt makePom
# normalize the generated poms into generated-poms/
curl -sSL https://github.com/akka/github-actions-scripts/raw/refs/heads/main/pom-organize.sh | bash
git add generated-poms
git commit -m "Update generated poms"Fails the job if any files under artifact-bom/ have changed, indicating the artifact BOM is out of sync with the sbt build.
Checks that the committed artifact-bom/ directory matches the output of the build's BOM generation. A diff means the dependency set has drifted from what is committed.
None.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Generate BOM
run: sbt makeBom
- name: Validate artifact BOM
uses: akka/github-actions-scripts/artifact_bom_validation@mainWhen this action fails, regenerate the BOM and commit it:
sbt makeBom
git add artifact-bom
git commit -m "Update artifact BOM"