fix: do not preserve spaces in the token #80

Merged
earl-warren merged 1 commit from earl-warren/forgejo-release:wip-secrets into main 2025-08-05 14:01:07 +00:00
Contributor

If a token has trailing whitespace by accident, they must not be preserved. Do not quote the value so that they are trimmed by shell evaluation.

If a token has trailing whitespace by accident, they must not be preserved. Do not quote the value so that they are trimmed by shell evaluation.
fix: do not preserve spaces in the token
All checks were successful
/ integration (pull_request) Successful in 18m28s
3a4d55c8c4
If a token has trailing whitespace by accident, they must
not be preserved. Do not quote the value so that they are trimmed
by shell evaluation.
earl-warren scheduled this pull request to auto merge when all checks succeed 2025-08-05 13:05:48 +00:00
viceice approved these changes 2025-08-05 13:06:33 +00:00
viceice left a comment

it should not contain any whitespace because it's a forgejo token

it should not contain any whitespace because it's a forgejo token
Author
Contributor

For the record there was what appears to be a transient error that I can't figure out. Archiving it for the record.

r.go:149]"
2025-08-05T13:20:10.3056264Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Env: {0 0    <nil> []    0 0}" func="[func1]" file="[runner.go:150]"
2025-08-05T13:20:10.3056354Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.If: {0 0  success()  <nil> []    0 0}" func="[func1]" file="[runner.go:151]"
2025-08-05T13:20:10.3056443Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: actions/checkout@v4" func="[func1]" file="[runner.go:154]"
2025-08-05T13:20:10.3056561Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: http://testuser:admin1234@172.17.0.2:3000/testuser/forgejo-release@vTest" func="[func1]" file="[runner.go:154]"
2025-08-05T13:20:10.3056704Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: http://testuser:admin1234@172.17.0.2:3000/testuser/forgejo-release@vTest" func="[func1]" file="[runner.go:154]"
2025-08-05T13:20:10.3056819Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: test \"$(find download-dir -name '*.asc')\"\ndiff -u upload-dir download-dir\n" func="[func1]" file="[runner.go:154]"
2025-08-05T13:20:10.3056914Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.TimeoutMinutes: " func="[func1]" file="[runner.go:157]"
2025-08-05T13:20:10.3057004Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Services: map[]" func="[func1]" file="[runner.go:158]"
2025-08-05T13:20:10.3057083Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Strategy: <nil>" func="[func1]" file="[runner.go:159]"
2025-08-05T13:20:10.3057170Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.RawContainer: {0 0    <nil> []    0 0}" func="[func1]" file="[runner.go:160]"
2025-08-05T13:20:10.3057273Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Defaults.Run.Shell: " func="[func1]" file="[runner.go:161]"
2025-08-05T13:20:10.3057373Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Defaults.Run.WorkingDirectory: " func="[func1]" file="[runner.go:162]"
2025-08-05T13:20:10.3057529Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Outputs: map[]" func="[func1]" file="[runner.go:163]"
2025-08-05T13:20:10.3057612Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Uses: " func="[func1]" file="[runner.go:164]"
2025-08-05T13:20:10.3057700Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.With: map[]" func="[func1]" file="[runner.go:165]"
2025-08-05T13:20:10.3057785Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Result: " func="[func1]" file="[runner.go:167]"
2025-08-05T13:20:10.3057864Z time="2025-08-05T15:20:09+02:00" level=debug msg="Empty Strategy, matrixes=[map[]]" func="[GetMatrixes]" file="[workflow.go:486]"
2025-08-05T13:20:10.3057954Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job Matrices: [map[]]" func="[func1]" file="[runner.go:186]"
2025-08-05T13:20:10.3058063Z time="2025-08-05T15:20:09+02:00" level=debug msg="Runner Matrices: map[]" func="[func1]" file="[runner.go:187]"
2025-08-05T13:20:10.3058156Z time="2025-08-05T15:20:09+02:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" func="[func1]" file="[runner.go:190]"
2025-08-05T13:20:10.3058247Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg] 🚀  Start image=code.forgejo.org/oci/node:20-bookworm
2025-08-05T13:20:10.3058329Z time="2025-08-05T15:20:09+02:00" level=debug msg="Detected CPUs: 16" func="[func1]" file="[runner.go:227]"
2025-08-05T13:20:10.3058413Z time="2025-08-05T15:20:09+02:00" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[1]" file="[executor.go:100]"
2025-08-05T13:20:10.3058498Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg]   🐳  docker pull image=code.forgejo.org/oci/node:20-bookworm platform= username= forcePull=false
2025-08-05T13:20:10.3058587Z time="2025-08-05T15:20:09+02:00" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[2]" file="[executor.go:100]"
2025-08-05T13:20:10.3058684Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg]   🐳  docker create image=code.forgejo.org/oci/node:20-bookworm platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="bridge"
2025-08-05T13:20:10.3058792Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg]   🐳  docker run image=code.forgejo.org/oci/node:20-bookworm platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="bridge"
2025-08-05T13:20:10.3058893Z + return 1
2025-08-05T13:20:10.3058972Z + rm -fr /tmp/tmp.o6j4rwWxmz
2025-08-05T13:20:10.4396190Z [RUNNER] time="2025-08-05T15:06:52+02:00" level=info msg="log level changed to debug" func="[initLogging]" file="[daemon.go:167]"
2025-08-05T13:20:10.4397891Z [RUNNER] time="2025-08-05T15:06:52+02:00" level=info msg="Starting runner daemon" func="[func6]" file="[daemon.go:38]"
For the record there was what appears to be a transient error that I can't figure out. Archiving it for the record. ``` r.go:149]" 2025-08-05T13:20:10.3056264Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Env: {0 0 <nil> [] 0 0}" func="[func1]" file="[runner.go:150]" 2025-08-05T13:20:10.3056354Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.If: {0 0 success() <nil> [] 0 0}" func="[func1]" file="[runner.go:151]" 2025-08-05T13:20:10.3056443Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: actions/checkout@v4" func="[func1]" file="[runner.go:154]" 2025-08-05T13:20:10.3056561Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: http://testuser:admin1234@172.17.0.2:3000/testuser/forgejo-release@vTest" func="[func1]" file="[runner.go:154]" 2025-08-05T13:20:10.3056704Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: http://testuser:admin1234@172.17.0.2:3000/testuser/forgejo-release@vTest" func="[func1]" file="[runner.go:154]" 2025-08-05T13:20:10.3056819Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Steps: test \"$(find download-dir -name '*.asc')\"\ndiff -u upload-dir download-dir\n" func="[func1]" file="[runner.go:154]" 2025-08-05T13:20:10.3056914Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.TimeoutMinutes: " func="[func1]" file="[runner.go:157]" 2025-08-05T13:20:10.3057004Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Services: map[]" func="[func1]" file="[runner.go:158]" 2025-08-05T13:20:10.3057083Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Strategy: <nil>" func="[func1]" file="[runner.go:159]" 2025-08-05T13:20:10.3057170Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.RawContainer: {0 0 <nil> [] 0 0}" func="[func1]" file="[runner.go:160]" 2025-08-05T13:20:10.3057273Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Defaults.Run.Shell: " func="[func1]" file="[runner.go:161]" 2025-08-05T13:20:10.3057373Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Defaults.Run.WorkingDirectory: " func="[func1]" file="[runner.go:162]" 2025-08-05T13:20:10.3057529Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Outputs: map[]" func="[func1]" file="[runner.go:163]" 2025-08-05T13:20:10.3057612Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Uses: " func="[func1]" file="[runner.go:164]" 2025-08-05T13:20:10.3057700Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.With: map[]" func="[func1]" file="[runner.go:165]" 2025-08-05T13:20:10.3057785Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job.Result: " func="[func1]" file="[runner.go:167]" 2025-08-05T13:20:10.3057864Z time="2025-08-05T15:20:09+02:00" level=debug msg="Empty Strategy, matrixes=[map[]]" func="[GetMatrixes]" file="[workflow.go:486]" 2025-08-05T13:20:10.3057954Z time="2025-08-05T15:20:09+02:00" level=debug msg="Job Matrices: [map[]]" func="[func1]" file="[runner.go:186]" 2025-08-05T13:20:10.3058063Z time="2025-08-05T15:20:09+02:00" level=debug msg="Runner Matrices: map[]" func="[func1]" file="[runner.go:187]" 2025-08-05T13:20:10.3058156Z time="2025-08-05T15:20:09+02:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" func="[func1]" file="[runner.go:190]" 2025-08-05T13:20:10.3058247Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg] 🚀 Start image=code.forgejo.org/oci/node:20-bookworm 2025-08-05T13:20:10.3058329Z time="2025-08-05T15:20:09+02:00" level=debug msg="Detected CPUs: 16" func="[func1]" file="[runner.go:227]" 2025-08-05T13:20:10.3058413Z time="2025-08-05T15:20:09+02:00" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[1]" file="[executor.go:100]" 2025-08-05T13:20:10.3058498Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg] 🐳 docker pull image=code.forgejo.org/oci/node:20-bookworm platform= username= forcePull=false 2025-08-05T13:20:10.3058587Z time="2025-08-05T15:20:09+02:00" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[2]" file="[executor.go:100]" 2025-08-05T13:20:10.3058684Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg] 🐳 docker create image=code.forgejo.org/oci/node:20-bookworm platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="bridge" 2025-08-05T13:20:10.3058792Z [Upload/download a signed release (with a GPG passphrase)/upload-gpg] 🐳 docker run image=code.forgejo.org/oci/node:20-bookworm platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="bridge" 2025-08-05T13:20:10.3058893Z + return 1 2025-08-05T13:20:10.3058972Z + rm -fr /tmp/tmp.o6j4rwWxmz 2025-08-05T13:20:10.4396190Z [RUNNER] time="2025-08-05T15:06:52+02:00" level=info msg="log level changed to debug" func="[initLogging]" file="[daemon.go:167]" 2025-08-05T13:20:10.4397891Z [RUNNER] time="2025-08-05T15:06:52+02:00" level=info msg="Starting runner daemon" func="[func6]" file="[daemon.go:38]" ```
earl-warren deleted branch wip-secrets 2025-08-05 14:01:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
actions/forgejo-release!80
No description provided.