* Delete script files before replacing during update
Signed-off-by: Tim Etchells <tetchel@gmail.com>
* Use IOUtil.DelteFile()
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
From February 2021, in order to provide feedback on pull requests, Code Scanning workflows must be configured with both `push` and `pull_request` triggers. This is because Code Scanning compares the results from a pull request against the results for the base branch to tell you only what has changed between the two.
Early in the beta period we supported displaying results on pull requests for workflows with only `push` triggers, but have discontinued support as this proved to be less robust.
See https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#scanning-pull-requests for more information on how best to configure your Code Scanning workflows.
During job run we may fail to resolve actions download info, and this
stack is fully controlled by GitHub actions so it should be counted as
infrastructure failure instead of user failure.
* Use FIPS compliant crypto when required
* Comment cleanup
* Store OAuth signing scheme in credentialData instead of runner setting
Add encryption scheme for job message encyption key to session
Further cleanup of unused crypto code
* Update windows rsa key manager to use crossplat dotnet RSA api
* Undo unneeded ConfigurationManager change
* add `workflow_dispatch`
* Add an environment variable to indicate which repository the currently running Action came from.
* Expose the Action ref as well.
* Move setting `github.action_repository` and `github.action_ref` to `ActionRunner.cs`.
* Don't set `action_repository` and `action_ref` for local Actions.
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
remove 3 "redundant" text and put one text for DRY.
and developers always forget `sudo` and annoying `Need to run with sudo privilege` message.
so, add first.
* Change `ping .. > nul` to `sleep`
The filename `nul` is a Windows-ism that causes the update script to
create such a file in the current working directory. The `ping`
utility is also an dependency not installed by
`installdependencies.sh`, so it seemed easier to change it to the
standard `sleep` command.
* Update dotnet-install script as requested by test
* Update dotnet-install.ps1
Co-authored-by: Tingluo Huang <tingluohuang@github.com>
* Unify apt/apt-get logic
The previous logic was buggy in that it tried to use `apt` in the `apt-get` branch after deciding that `apt` was unavailable...
* Prefer apt-get over apt
apt does not have a stable cli and using it from scripts yields annoying messages
* Improve English for missing apt-get & apt case
* Fix apt-get/apt fallback behavior for $ patterns
If there's a `$` in the apt install pattern, it will not fail if it selects a thing and decides it isn't interested in installing it.
* Fix spelling of libssl
This change updates the .NET Core SDK used by the Actions Runner to
version 3.1.302 to address the issues that are caused by the following issue:
https://github.com/dotnet/runtime/issues/13475
See #574 for more information.
Fixes#574
* Log in with container credentials if given
* Stub in registry aware auth for later
* Fix hang if password is empty
* Remove default param to fix build
* PR Feedback. Add some tests and fix parse
* Add environment variable for GITHUB_ACTION_PATH
* ah
* Remove debugging messages
* Set github action path at step level instead of global scope to avoid necessary removal
* Remove set context for github action
* Set github action path before and after composite action
* Copy GitHub Context, use this copied context for each composit step, and then set the action_path for each one (to avoid stamping over parent pointer GitHubContext
* Explicitly define what is allowed for an action
* Add step-env
* Remove secrets + defaults
* new line
* Add safety check to prevent from checking defaults in ScriptHandler for composite action
* Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action"
This reverts commit aeae15de7b.
* Need to explictly use ActionStep type since we need the .Inputs attribute which is only found in the ActionStep not IStep
* Fix ActionManifestManager
* Remove todos
* Revert "Revert "Add safety check to prevent from checking defaults in ScriptHandler for composite action""
This reverts commit a22fcbc036.
* revert
* Remove needs in env
* Make shell required + add inputs
* Remove passing context to all composite steps attribuyte
* Remove redundant code (display name is already evaluated in ActionRunner beforehand for each step)
* remove
* Remove nesting information for composite steps.
* put messages in debug logs if composite. if not, put these messages as outputs
* Fix group issue
* Fix end group issue
* Exploring child Linked Cancellation Tokens
* Preliminary Timeout-minutes fix
* Final Solution for resolving cancellation token's timeout vs. cancellation
* Clean up + Fix error handling
* Use linked tokens instead
* Clean up
* one liner
* Remove JobExecutionContext => Replace with public Root accessor
* Move CreateLinkedTokenSource in the CreateCompositeStep Function
This PR changes GITHUB_ACTION to use the step ContextName, instead of refname. The behavior is behind a feature flag. Refname is an otherwise deprecated property.
Primary motivation: For composite actions, we need a distinct GITHUB_ACTION for each nested step. This PR adds code to generate a default context name for nested steps.
For nested steps, GITHUB_ACTION will be set to "{ScopeName}.{ContextName}" to ensure no collisions.
A corresponding change will be made on the server so context name is never empty. Generated context names will start with "__".
A follow-up PR is required to avoid tracking "step" context values (outputs/conclusion/result) for generated context names. Waiting on telemetry from the server to confirm it's safe to assume leading "__" is a generate context name.
* Add basic framework for baby steps runner
* Basic logic for adding steps / invoking composite action steps
* Composite Steps Runner MVP
* Fix null object reference error
* intialize composiute
* Comment out code that is handled by stepsrunner
* Add composite clean up step
* Remove previous 'workarounds' from StepsRunner. Clean Up PR
* Remove todo
* Remove todo
* Fix using unitialized object yikes
* Remove time delay
* Format handler
* Move output handler into action handler
* Add try to evaluate display name
* Remove while loop yikes
* Abstract away the windows encoding check during step running
* Github context set to {ScopeName}.{ContextName} or {ContextName} if ScopeName is null
* Remove setting result to sucess since result defaults to sucess
* Fix windows error
* Fix windows
* revert:
* Windows fix
* Fix Windows Error in Abstraction
* Remove Composite Steps Runner => consolidate into Composite Steps Runner
* Remove unn. attribute in ExecutionContext
* Change protection levels, plus change function name to more clear meaning
* Remove location param
* location pt.2 fix
* Remove outputs step
* Remove temp directory
* new line
* Add arguitl not null
* better comment
* Change encoding name
* Check count > 0 for composite steps, import System.Threading
* Change function header encodingutil
* Add TODO
* Add await
* Handle Failed Step
* Move over SetAllCompositeOutputs to the handler
* Remove timeout-minutes setting in steps-level
* Use only ExecutionContext
* Move using to the top
* Remove redundant check
* Change function name
* Remove testing code
* Consolidate error code
* Consolidate code
* Change HandleOutput => ProcessCompositeActionOutputs
* Remove set the timeout comment
* Add Cancelling functionality + Remove unn. parameter
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.