mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #235] Feature Request: GPG-signing of test results #161
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jayaddison on GitHub (May 13, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/235
User story
As a developer, I'd like to make frequent commits, and would like to run my tests via
actso that I can receive test feedback before GitHub actions run after a push.Additionally, as a considerate user of costly infrastructure, I would prefer to minimize the amount of compute resources used by GitHub actions and/or any other CI providers linked to the project(s) I work on.
I would like the ability to GPG-sign my commits to indicate a pass/fail test result 'on my machine', so that these claimed test results are visible to other viewers of my commits and pull requests.
Caveats
A GPG-signed pass or failure would would not be a cast-iron guarantee of a replicable result.
Trust in the developer is required - it would be possible for a developer to accidentally or maliciously corrupt their commit pass/fail results; but it is likely the case that developers are incentivized to illustrate that they are reliable, careful and trustworthy -- and that should strongly encourage accurate test result signing
Not all languages and environments are perfectly reproducible - a commit that genuinely did pass for a developer locally may fail in other build environments, for a variety of reasons (different operating system behaviours, presence/lack of secrets, different dependencies retrieved at build-time, bugs relating to concurrency, ...)
It would require upstream support from GitHub and/or CI providers to allow 'skipping' invocation of cloud-based compute actions based on a GPG-signed commits
Some developer configuration would be required, and dealing with GPG keys can be challenging. This is not necessarily
act's problem to solve, but it would be a factor in adoption@cplee commented on GitHub (May 14, 2020):
@jayaddison - seems interesting, but not clear on what part of this workflow
actwill plan. You could definitely use a post-commit hook to runact, but then how does the signature get applied? Do you wantactto amend the commit to add the signature? Could the post commit hook just be a bash script that runsactand thengit commit --amend?@jayaddison commented on GitHub (May 14, 2020):
@cplee Good questions.
As additional context: while it may be convenient to allow developers to automate the process via commit hooks, it may also be good to allow them to
actsign (or re-sign) commits manually -- for example, if they fix their environment and then want to re-run tests before pushing their commits -- or if they only want to sign a subset of commits.Given that extra scenario, a new flag along the lines of
act --sign(and perhapsact -Sas an abbreviation, since that aligns withgit commit -S) might make sense.Now we get to your core question - how does this apply. Two possible approaches spring to mind:
Tag-signing considerations
Tags are interesting because they preserve the integrity of the existing commit SHA.
They can also be considered somewhat ephemeral (like branches), and can be added and removed over time.
'Release tags' may be considered a stricter exception, whereby developers should not really remove a tagged (and potentially signed) tag once versioned content has been available for general consumption.
Commit-signing considerations
Commits are in some senses 'easier' -- they can be amended, as you mention, and content authors generally become familiar with commits at an earlier point in their git learning curve than tags. Tags, for example, typically require an additional command-line flags to push alongside commits.
Thoughts (work-in-progress)
To ease developer experience I think I would lean towards amending and signing commits - it'd be good to discuss further though (and gather wider feedback).
PS: As an aside, I noticed that there's already a concept of an
~/.actrc, and would suggest that could be a good place for (opt-in, default disabled) signing configuration.@github-actions[bot] commented on GitHub (Jul 14, 2020):
Issue is stale and will be closed in 7 days unless there is new activity