Skip to content

chore(ci): add gha linter (zizmore) and fix issues - #1252

Open
cgoetz-inovex wants to merge 3 commits into
mainfrom
feat/STACKITSDK-614-gha-lint
Open

cgoetz-inovex wants to merge 3 commits into
mainfrom
feat/STACKITSDK-614-gha-lint

Conversation

@cgoetz-inovex

Copy link
Copy Markdown
Contributor
  • pin each action to hash
  • use persist-credentials: false on checkout actions
  • scope GITHUB_TOKEN to create git tags step

STACKITSDK-614

Description

relates to #1234

Checklist

  • Issue was linked above
  • No generated code was adjusted manually
  • Changelogs
    • Changelog in the root directory was adjusted
    • Changelog(s) of the service(s) were adjusted
  • VERSION file(s) of the service(s) were adjusted
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

- pin each action to hash
- use persist-credentials: false on checkout actions
- scope GITHUB_TOKEN to create git tags step

STACKITSDK-614
@cgoetz-inovex
cgoetz-inovex requested a review from a team as a code owner November 9, 2026 09:46
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread scripts/publish.sh Outdated
echo "Tag '$expected_tag' does not exist."
git tag -a $expected_tag -m "Release $version"
git push origin tag $expected_tag
auth_header=$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 -w0)

@rubenhoenle rubenhoenle Nov 9, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What was the reason to change this?

With this change you can't just run the script locally anymore without any extra setup.

Edit: I know that for the Java SDK this script needs additional inputs for the maven central publishing anyways. But we have basically the same script for the git tags in the Go SDK repo where actually only have to set the git tags for publishing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before the script relied on credentials stored from checkout action.
I've wanted to scope the token only to the steps that actually use it.

Regarding local exec: would it be an option to use gh cli in this script for getting a token? That would work locally out of the box if gh is installed.

Sth. like: `git -c 'credential.helper=!gh auth git-credential' push origin tag "$expected_tag" should work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed this to use persist-credentials: true instead.

Comment thread .github/workflows/ci.yaml Outdated
with:
# we need to fetch all existing git tags
fetch-depth: 0
persist-credentials: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as below, what was the reason to add the persist-credentials: false here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

3 participants