Skip to content

add github actions#2

Closed
grabsefx wants to merge 2 commits into
mainfrom
develop
Closed

add github actions#2
grabsefx wants to merge 2 commits into
mainfrom
develop

Conversation

@grabsefx

@grabsefx grabsefx commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Added CI workflows for building, releasing, and promoting artifacts to automate releases and deployments.
    • Introduced manual release workflow with version inputs and automated release workflow for main branch.
  • Release
    • Project version updated to 1.0.0.

@grabsefx grabsefx self-assigned this Apr 6, 2026
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47defc99-0bbd-4baf-8229-0fcad22fe39a

📥 Commits

Reviewing files that changed from the base of the PR and between 409b757 and 49d67f8.

📒 Files selected for processing (1)
  • gradle.properties

Walkthrough

Adds four GitHub Actions workflows for building, manual and automatic releasing, and promoting artifacts; updates project version in gradle.properties. Workflows run JDK 25, execute Gradle build/release tasks with GPG/signing and credentials, upload build artifacts, and automate staged promotion to Sonatype.

Changes

Cohort / File(s) Summary
Build workflow
\.github/workflows/build.yml
New Build workflow: triggers on workflow_dispatch, pull_request, and push (main/develop), checks out code, sets up Temurin JDK 25, runs ./gradlew build --stacktrace, and uploads build/libs/*.jar as artifact.
Manual release
\.github/workflows/manually-release.yml
Adds manual workflow_dispatch release: accepts version, scripts_version, bom_version; sets env vars, configures JDK 25, git credentials, and runs ./gradlew release with Gradle properties and GPG signing via secrets.
Automatic release
\.github/workflows/release.yml
Adds release on push to main: sets env vars (scripts/BOM versions), configures JDK 25 and git credentials, and runs ./gradlew release with required -P properties and signing secrets.
Promotion to Nexus
\.github/workflows/promote.yml
Adds Promote workflow: workflow_dispatch with version input; downloads versioned artifacts from GitHub Packages by suffix list, bundles files into bundle.jar, uploads to Sonatype staging, polls for closed state, and triggers bulk/promote to publish.
Version bump
gradle.properties
Updates version from 1.0.0-SNAPSHOT-2 to 1.0.0.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Repo as GitHub Packages (repo)
  participant Gradle as Gradle (build/release)
  participant Nexus as Sonatype Nexus (staging)

  GH->>Repo: Download versioned artifacts (promote.yml)
  Repo-->>GH: Return artifact files
  GH->>GH: Bundle downloaded files (bundle.jar)
  GH->>Nexus: Upload bundle to staging (bundle_upload)
  Nexus-->>GH: Return staging repository URI (JSON)
  GH->>Nexus: Poll staging status until closed/ready
  Nexus-->>GH: Status updates
  GH->>Nexus: Promote staged repository (bulk/promote)
  GH->>Gradle: Run build/release steps (build.yml / release.yml / manually-release.yml)
  Gradle-->>GH: Produce artifacts / release result
  GH->>Repo: Upload built artifacts (build job)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through workflows, jars in tow,
Built with Temurin, then off they go.
Signed and bundled, pushed to the sky,
Nexus awaits—hop, promote, and fly! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'add github actions' is overly vague and generic—it doesn't convey which specific GitHub Actions workflows or what functional purpose they serve. Consider a more descriptive title such as 'Add CI/CD workflows for build, release, and artifact promotion' to clarify the scope and purpose of the added workflows.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
.github/workflows/promote.yml (1)

34-53: Make jar availability explicit for reproducibility.

The script uses jar -cvf but does not explicitly install/setup a JDK in this workflow. Adding actions/setup-java makes toolchain behavior deterministic.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/promote.yml around lines 34 - 53, The workflow uses the
jar command in the "Upload package" step (BUNDLE_FILE, jar -cvf) but never
ensures a JDK is installed; add an explicit actions/setup-java step before the
Upload package step to install a specific Java version and set JAVA_HOME so the
jar tool is available and behavior is reproducible; reference the "Upload
package" step and BUNDLE_FILE/jar invocation and configure setup-java with a
fixed java-version and distribution so the jar command runs deterministically.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Line 57: Replace the mutable workflow ref by pinning the reusable workflow to
a specific commit SHA: locate the uses entry
"reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main" and
replace the "@main" suffix with the exact commit SHA from the upstream
repository (e.g., "...@<commit-sha>"); ensure you fetch the immutable SHA for
the desired version and update the uses string accordingly so the workflow
references that commit instead of the branch.

In @.github/workflows/manually-release.yml:
- Around line 6-14: The workflow defines a required input named version but
never uses it in the Gradle release invocation; update the release step that
runs the Gradle command (the step invoking the Gradle release task / the
./gradlew release call) to pass the input into Gradle properties (e.g., use the
workflow input version via ${{ github.event.inputs.version }} as -Pversion=...
and similarly wire scripts_version and bom_version if needed) or remove the
unused version input from the workflow inputs block if version is intended to be
auto-derived.
- Line 17: The GH_USER_NAME environment variable is set to the literal string
"github.actor" instead of using workflow expression syntax; update the workflow
to assign GH_USER_NAME using the GitHub context expression (github.actor) so it
evaluates at runtime and passes the correct actor value to later steps
(referenced where GH_USER_NAME is used on line 49); locate the GH_USER_NAME key
in the job/env block and replace the literal with the proper expression form.
- Line 27: Update the checkout action usage to the latest supported release by
replacing the current reference "uses: actions/checkout@v2" with the modern
major version (e.g., "actions/checkout@v6"); ensure the workflow
(manually-release.yml) meets the runner requirement (Actions Runner v2.327.1+)
and adjust any workflow compatibility settings if needed so the workflow runs on
current Node.js runtimes.

In @.github/workflows/promote.yml:
- Around line 23-28: The workflow uses GITHUB_TOKEN to download GitHub Packages
artifacts but lacks explicit permissions; update the promote.yml workflow to set
the GitHub Actions permissions to include "packages: read" (either at the
top-level permissions key or in the specific job that performs the download) so
the artifact download step that uses GITHUB_TOKEN can access GitHub Packages;
ensure the permissions entry is added alongside existing workflow metadata and
before job definitions so the download step can run under restricted defaults.
- Around line 63-65: The script assigns repo using repo=`jq -r
'.repositoryUris[0]' response.json` but jq returns the literal "null" for null
values so the subsequent if [ -z "$repo" ] check misses it and exports
NEXUS_REPOSITORY=null; update the jq call or the validation: change the jq
expression to produce an empty string for null (e.g. use the // empty construct)
or alter the conditional to treat both empty and the literal "null" as invalid,
ensuring repo is rejected and the script exits before exporting
NEXUS_REPOSITORY.

In @.github/workflows/release.yml:
- Line 13: The GH_USER_NAME environment variable is set to the literal string
"github.actor" instead of interpolating the GitHub Actions context; update the
env entry that defines GH_USER_NAME in the release workflow to use the correct
Actions expression syntax (use the context interpolation for github.actor) so
the actual actor username is passed to Gradle.
- Line 22: The workflow step currently uses the deprecated action reference
"uses: actions/checkout@v2"; update that step to a supported major version (for
example "actions/checkout@v4") across the workflow so the runner uses the
maintained release, and run a quick lint/CI after changing the "uses:
actions/checkout@v2" token to confirm no other workflow syntax or compatibility
issues remain.
- Around line 17-19: Add explicit workflow permissions for the release job so
the GITHUB_TOKEN has the rights needed for git and Gradle release tasks: update
the job block named "release" to include a top-level permissions map granting at
least contents: write, issues: write (or other required scopes) and any other
scopes used by Gradle/gh actions, and ensure the job uses secrets.GITHUB_TOKEN
as the authenticated token referenced in the existing release steps.

---

Nitpick comments:
In @.github/workflows/promote.yml:
- Around line 34-53: The workflow uses the jar command in the "Upload package"
step (BUNDLE_FILE, jar -cvf) but never ensures a JDK is installed; add an
explicit actions/setup-java step before the Upload package step to install a
specific Java version and set JAVA_HOME so the jar tool is available and
behavior is reproducible; reference the "Upload package" step and
BUNDLE_FILE/jar invocation and configure setup-java with a fixed java-version
and distribution so the jar command runs deterministically.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a76a5a1-888c-4b68-bb9e-4083183d44f7

📥 Commits

Reviewing files that changed from the base of the PR and between 8a005a6 and 409b757.

📒 Files selected for processing (4)
  • .github/workflows/build.yml
  • .github/workflows/manually-release.yml
  • .github/workflows/promote.yml
  • .github/workflows/release.yml

upload:
needs: build
if: github.ref_name == 'develop' || startsWith(github.ref_name, 'feature/')
uses: reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check if the file exists and read the relevant section
if [ -f ".github/workflows/build.yml" ]; then
  echo "=== File found. Reading lines 50-65 ===" 
  sed -n '50,65p' .github/workflows/build.yml
else
  echo "File not found. Searching for build.yml files..."
  find . -name "build.yml" -type f
fi

Repository: reportportal/plugin-auth-github

Length of output: 565


🏁 Script executed:

# Also search for other `@main` references in workflow files
echo "=== Searching for `@main` references in workflow files ==="
rg "@main" .github/workflows/ --type yaml

Repository: reportportal/plugin-auth-github

Length of output: 241


Pin reusable workflow to an immutable commit SHA.

Line 57 references @main, which is mutable. Pinning to a commit SHA avoids unintended behavior from upstream changes.

Suggested change
-    uses: reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main
+    uses: reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@<commit-sha>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml at line 57, Replace the mutable workflow ref by
pinning the reusable workflow to a specific commit SHA: locate the uses entry
"reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main" and
replace the "@main" suffix with the exact commit SHA from the upstream
repository (e.g., "...@<commit-sha>"); ensure you fetch the immutable SHA for
the desired version and update the uses string accordingly so the workflow
references that commit instead of the branch.

Comment on lines +6 to +14
version:
description: 'Release version'
required: true
scripts_version:
description: 'Gradle scripts version'
required: true
bom_version:
description: 'Commons bom version'
required: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Required version input is not used in the release command.

version is mandatory at dispatch time but never consumed in Lines 48–51. This can mislead operators and cause unexpected release output.

Please either wire the input into Gradle release properties or remove the input if the version is intentionally auto-derived.

Also applies to: 48-51

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/manually-release.yml around lines 6 - 14, The workflow
defines a required input named version but never uses it in the Gradle release
invocation; update the release step that runs the Gradle command (the step
invoking the Gradle release task / the ./gradlew release call) to pass the input
into Gradle properties (e.g., use the workflow input version via ${{
github.event.inputs.version }} as -Pversion=... and similarly wire
scripts_version and bom_version if needed) or remove the unused version input
from the workflow inputs block if version is intended to be auto-derived.

required: true

env:
GH_USER_NAME: github.actor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/manually-release.yml | head -30

Repository: reportportal/plugin-auth-github

Length of output: 987


🏁 Script executed:

cat .github/workflows/manually-release.yml | grep -n "GH_USER_NAME"

Repository: reportportal/plugin-auth-github

Length of output: 200


Use expression syntax for GH_USER_NAME.

Line 17 stores a literal string instead of evaluating the GitHub context. Without expression syntax, GH_USER_NAME will be set to the literal string "github.actor" rather than the triggering actor's username, causing the parameter passed on line 49 to be incorrect.

Suggested fix
-  GH_USER_NAME: github.actor
+  GH_USER_NAME: ${{ github.actor }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
GH_USER_NAME: github.actor
GH_USER_NAME: ${{ github.actor }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/manually-release.yml at line 17, The GH_USER_NAME
environment variable is set to the literal string "github.actor" instead of
using workflow expression syntax; update the workflow to assign GH_USER_NAME
using the GitHub context expression (github.actor) so it evaluates at runtime
and passes the correct actor value to later steps (referenced where GH_USER_NAME
is used on line 49); locate the GH_USER_NAME key in the job/env block and
replace the literal with the proper expression form.

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/manually-release.yml | head -40

Repository: reportportal/plugin-auth-github

Length of output: 1319


🌐 Web query:

actions/checkout v2 deprecation end of life current version

💡 Result:

  • actions/checkout@v2 status: It’s considered legacy/deprecated in practice because it’s one of the common actions that triggered GitHub’s Node.js 12 deprecation warnings (GitHub moved Actions off Node 12 to Node 16 by default). [1], [2]
  • End-of-life (EOL): GitHub has announced runtime transitions (Node12→Node16, Node16→Node20, etc.), but there isn’t a single, official “checkout@v2 EOL date” announcement that removes the v2 tag specifically; the guidance is to upgrade to a supported major. [1], [2]
  • Current version (recommended): actions/checkout@v6 (latest release shown: v6.0.2, Jan 9, 2026). [3]
    • v5/v6 run on newer runtimes (README notes v5 updated to node24 and requires Actions Runner v2.327.1+). [3]

What to change in workflows

- uses: actions/checkout@v6

Sources
[1] GitHub Changelog: Node12→Node16 default transition (June 13, 2023). (github.blog)
[2] GitHub Community discussion showing the Node12 deprecation warning and recommending upgrading from actions/checkout@v2. (github.com)
[3] actions/checkout repo README showing current majors and latest release (v6.0.2), plus runner requirement for node24-based versions. (github.com)

Citations:


Update actions/checkout to the latest version.

Line 27 is using actions/checkout@v2, which is legacy/deprecated following GitHub's Node.js 12 deprecation. The latest version is v6, which requires Actions Runner v2.327.1+ and runs on current node runtimes.

Suggested fix
-        uses: actions/checkout@v2
+        uses: actions/checkout@v6
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v6
🧰 Tools
🪛 actionlint (1.7.12)

[error] 27-27: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/manually-release.yml at line 27, Update the checkout
action usage to the latest supported release by replacing the current reference
"uses: actions/checkout@v2" with the modern major version (e.g.,
"actions/checkout@v6"); ensure the workflow (manually-release.yml) meets the
runner requirement (Actions Runner v2.327.1+) and adjust any workflow
compatibility settings if needed so the workflow runs on current Node.js
runtimes.

Comment on lines +23 to +28
env:
REPOSITORY_URL: 'https://maven.pkg.github.com'
UPSTREAM_REPOSITORY_URL: 'https://oss.sonatype.org'
PACKAGE_SUFFIXES: '-javadoc.jar,-javadoc.jar.asc,-sources.jar,-sources.jar.asc,.jar,.jar.asc,.pom,.pom.asc'
PACKAGE: 'com.epam.reportportal'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/promote.yml

Repository: reportportal/plugin-auth-github

Length of output: 5122


Add explicit packages: read permission for GitHub Packages artifact download.

This workflow downloads artifacts from GitHub Packages using GITHUB_TOKEN at line 45. Add explicit permissions so behavior is stable under restricted defaults.

Suggested fix
+permissions:
+  packages: read
+
 env:
   REPOSITORY_URL: 'https://maven.pkg.github.com'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
REPOSITORY_URL: 'https://maven.pkg.github.com'
UPSTREAM_REPOSITORY_URL: 'https://oss.sonatype.org'
PACKAGE_SUFFIXES: '-javadoc.jar,-javadoc.jar.asc,-sources.jar,-sources.jar.asc,.jar,.jar.asc,.pom,.pom.asc'
PACKAGE: 'com.epam.reportportal'
permissions:
packages: read
env:
REPOSITORY_URL: 'https://maven.pkg.github.com'
UPSTREAM_REPOSITORY_URL: 'https://oss.sonatype.org'
PACKAGE_SUFFIXES: '-javadoc.jar,-javadoc.jar.asc,-sources.jar,-sources.jar.asc,.jar,.jar.asc,.pom,.pom.asc'
PACKAGE: 'com.epam.reportportal'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/promote.yml around lines 23 - 28, The workflow uses
GITHUB_TOKEN to download GitHub Packages artifacts but lacks explicit
permissions; update the promote.yml workflow to set the GitHub Actions
permissions to include "packages: read" (either at the top-level permissions key
or in the specific job that performs the download) so the artifact download step
that uses GITHUB_TOKEN can access GitHub Packages; ensure the permissions entry
is added alongside existing workflow metadata and before job definitions so the
download step can run under restricted defaults.

Comment on lines +63 to +65
repo=`jq -r '.repositoryUris[0]' response.json`
if [ -z "$repo" ]; then
echo 'Unable to upload bundle' 1>&2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find and inspect the workflow file
find . -name "promote.yml" -type f

Repository: reportportal/plugin-auth-github

Length of output: 106


🏁 Script executed:

# Test how jq -r behaves with null values
# Create a test JSON with null value
echo '{"repositoryUris": [null]}' | jq -r '.repositoryUris[0]'
echo "Exit code: $?"
echo "---"
# Test with empty array
echo '{"repositoryUris": []}' | jq -r '.repositoryUris[0]'
echo "Exit code: $?"

Repository: reportportal/plugin-auth-github

Length of output: 114


🏁 Script executed:

# Test bash -z check with "null" string
repo="null"
if [ -z "$repo" ]; then
  echo "Empty string detected"
else
  echo "String is not empty: '$repo'"
fi
echo "---"
# Test the proposed fix
if [ -z "$repo" ] || [ "$repo" = "null" ]; then
  echo "Either empty or null detected"
else
  echo "Neither empty nor null"
fi

Repository: reportportal/plugin-auth-github

Length of output: 136


🏁 Script executed:

cat -n .github/workflows/promote.yml | sed -n '60,70p'

Repository: reportportal/plugin-auth-github

Length of output: 521


🏁 Script executed:

# Let me also check the full context around those lines
cat -n .github/workflows/promote.yml | sed -n '55,75p'

Repository: reportportal/plugin-auth-github

Length of output: 1100


Handle jq null values explicitly when validating repository URI.

At Lines 63–65, jq -r '.repositoryUris[0]' returns the literal string "null" when the field is null in JSON, and the current -z check won't catch it. This causes the validation to pass incorrectly, and NEXUS_REPOSITORY=null is exported to the environment at line 69, causing downstream issues.

Suggested fix
-          repo=`jq -r '.repositoryUris[0]' response.json`
-          if [ -z "$repo" ]; then
+          repo=`jq -r '.repositoryUris[0]' response.json`
+          if [ -z "$repo" ] || [ "$repo" = "null" ]; then
             echo 'Unable to upload bundle' 1>&2
             cat response.json 1>&2
             exit 1
           fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
repo=`jq -r '.repositoryUris[0]' response.json`
if [ -z "$repo" ]; then
echo 'Unable to upload bundle' 1>&2
repo=`jq -r '.repositoryUris[0]' response.json`
if [ -z "$repo" ] || [ "$repo" = "null" ]; then
echo 'Unable to upload bundle' 1>&2
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/promote.yml around lines 63 - 65, The script assigns repo
using repo=`jq -r '.repositoryUris[0]' response.json` but jq returns the literal
"null" for null values so the subsequent if [ -z "$repo" ] check misses it and
exports NEXUS_REPOSITORY=null; update the jq call or the validation: change the
jq expression to produce an empty string for null (e.g. use the // empty
construct) or alter the conditional to treat both empty and the literal "null"
as invalid, ensuring repo is rejected and the script exits before exporting
NEXUS_REPOSITORY.

- gradle.properties

env:
GH_USER_NAME: github.actor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/release.yml | head -30

Repository: reportportal/plugin-auth-github

Length of output: 822


🏁 Script executed:

cat -n .github/workflows/release.yml | grep -A 2 -B 2 "GH_USER_NAME"

Repository: reportportal/plugin-auth-github

Length of output: 552


Fix actor interpolation in env.

Line 13 sets a literal string (github.actor) instead of interpolating the GitHub Actions context expression. This causes Gradle to receive the wrong username value. Update to use proper interpolation syntax:

Suggested fix
-  GH_USER_NAME: github.actor
+  GH_USER_NAME: ${{ github.actor }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
GH_USER_NAME: github.actor
GH_USER_NAME: ${{ github.actor }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 13, The GH_USER_NAME environment
variable is set to the literal string "github.actor" instead of interpolating
the GitHub Actions context; update the env entry that defines GH_USER_NAME in
the release workflow to use the correct Actions expression syntax (use the
context interpolation for github.actor) so the actual actor username is passed
to Gradle.

Comment on lines +17 to +19
jobs:
release:
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "release.yml" -o -name "release.yaml" | head -20

Repository: reportportal/plugin-auth-github

Length of output: 106


🏁 Script executed:

cat -n .github/workflows/release.yml 2>/dev/null || cat -n ./.github/workflows/release.yml 2>/dev/null || find . -type f \( -name "*.yml" -o -name "*.yaml" \) | grep -i release

Repository: reportportal/plugin-auth-github

Length of output: 1566


Declare explicit token permissions for release operations.

This job performs authenticated release actions using secrets.GITHUB_TOKEN for git credentials and Gradle release operations (lines 33–45). Without explicit permissions, runs may fail under restricted default token settings.

Suggested fix
+permissions:
+  contents: write
+  packages: write
+
 jobs:
   release:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 17 - 19, Add explicit workflow
permissions for the release job so the GITHUB_TOKEN has the rights needed for
git and Gradle release tasks: update the job block named "release" to include a
top-level permissions map granting at least contents: write, issues: write (or
other required scopes) and any other scopes used by Gradle/gh actions, and
ensure the job uses secrets.GITHUB_TOKEN as the authenticated token referenced
in the existing release steps.

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Upgrade actions/checkout to a supported major version.

Line 22 uses actions/checkout@v2, which is too old for current runners (also confirmed by actionlint).

Suggested fix
-        uses: actions/checkout@v2
+        uses: actions/checkout@v5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v5
🧰 Tools
🪛 actionlint (1.7.12)

[error] 22-22: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 22, The workflow step currently uses
the deprecated action reference "uses: actions/checkout@v2"; update that step to
a supported major version (for example "actions/checkout@v4") across the
workflow so the runner uses the maintained release, and run a quick lint/CI
after changing the "uses: actions/checkout@v2" token to confirm no other
workflow syntax or compatibility issues remain.

@grabsefx grabsefx closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant