gradle / gradle/actions

`build-scan-publish` is ignored when `onlyIf { false }` was used

Open
#627 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
340
Forks
117
Avg merge
1d 9h
Merged PRs (30d)
11

Description

As documented on https://docs.gradle.com/develocity/gradle-plugin/current/ at `Publishing on demand` I configured `onlyIf { false }` to only publish build scans on demand and be able to use `buildScanPublishPrevious`.

In this action I set `build-scan-publish: 'true'` to always publish build scan when run on GHA.

But no build scan is published on execution.

I don't want to use `--scan` right now as the build is still on `8.0.2` and I don't have the time to upgrade right now, and using it with `8.0.2` would fail the build as latest Develocity plugin is applied which would then complain about Enterprise plugin added by `--scan`.

The work-around I am using now is `onlyIf { System.getenv("DEVELOCITY_INJECTION_ENABLED").toBoolean() }`, but it would be nice if it either just worked or at the very least be included in the documentation of this action.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the `build-scan-publish` input is handled in the action and compare that behavior with the documented “Publishing on demand” configuration. Done means the input works when `onlyIf { false }` is configured, or the action documentation clearly explains the limitation and supported workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.