Repository navigation
chore(ci): add gha linter (zizmore) and fix issues - #1252
cgoetz-inovex wants to merge 3 commits into
Conversation
- pin each action to hash - use persist-credentials: false on checkout actions - scope GITHUB_TOKEN to create git tags step STACKITSDK-614
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
changed this to use persist-credentials: true instead.
| with: | ||
| # we need to fetch all existing git tags | ||
| fetch-depth: 0 | ||
| persist-credentials: false |
There was a problem hiding this comment.
Same as below, what was the reason to add the persist-credentials: false here?
There was a problem hiding this comment.
…ha-lint # Conflicts: # .github/workflows/ci.yaml
STACKITSDK-614
Description
relates to #1234
Checklist
make fmtexamples/directory)make test(will be checked by CI)make lint(will be checked by CI)