Commit Graph

94 Commits

Author SHA1 Message Date
Thomas Horstmeyer 9b14aa7c84 Merge branch 'main' into use-better-base-sha 2022-02-04 12:04:41 +00:00
Thomas Horstmeyer 3469c69bba Merge branch 'main' into use-better-base-sha 2022-02-02 13:52:13 +00:00
Arthur Baars d57c2761c9 Fix typo in error message 2022-02-02 13:51:48 +01:00
Andrew Eisenberg 13f97c81fe Merge branch 'aeisenberg/permissions' into add-ref-input 2022-02-01 10:31:14 -08:00
Andrew Eisenberg 36419a79c1 Avoid sending status reports in test mode 2022-02-01 10:12:35 -08:00
Thomas Horstmeyer ec0b3ae7ff remove some debug info 2022-02-01 15:39:11 +00:00
Thomas Horstmeyer e836f97769 Detect merge base as base_sha for upload 2022-02-01 15:38:43 +00:00
Alex Croteau 1eaaf07b91 Adds check on inputs and compiled files 2022-01-31 20:06:17 -05:00
Andrew Eisenberg 6a98a4b500 Allow multiple uploads in a single job
They must all have a unique category. The category will be
converted into an environment variable.
2021-11-15 09:16:25 -08:00
Edoardo Pirovano f360da772a Sanitize artifact name before using 2021-11-05 08:40:16 +00:00
Andrew Eisenberg 40568daca8 Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause
is now `unknown` type. So, we need to cast the `e`, `err`, or `error`
variables to type `Error`.
2021-09-10 14:06:27 -07:00
Edoardo Pirovano 05fc5a885c Replace safeLoad with load 2021-07-27 22:12:26 +01:00
Edoardo Pirovano d9849b8ca1 Rebuild after TypeScript version bump 2021-07-27 17:59:59 +01:00
Robert 146c897909 Upload CodeQL databases 2021-06-22 13:05:12 +01:00
Robert d893508e3a Revert "Upload CodeQL databases" 2021-06-21 10:26:02 +01:00
Robert c989ee7b39 Provide a better error message 2021-06-16 17:00:26 +01:00
Robert d693b3cb0d Check if on default branch before uploading database 2021-06-16 14:43:42 +01:00
Andrew Eisenberg f60ef170b0 Cleaning up comments around env vars
Also, move `getTemporaryDirectory` back to `actions-util`.
2021-06-03 11:33:20 -07:00
Andrew Eisenberg 2c2ebdc5c5 Remove local environment running
This is a functionality that never worked perfectly and hasn't been
used for a while.

This allows developers to run the action on their local machine, but
the run was always flaky and never 100% mirrored what was happening on
the actions runner.
2021-06-02 11:26:11 -07:00
Andrew Eisenberg 3708898bf2 Add environment variables to signal feature and version to the CLI
This PR ensures environment variables are set before any invocation of
the CLI.  Here is a list of vars that are set:

https://github.com/github/codeql-coreql-team/issues/1124#issuecomment-852463521

This ensures the CLI knows the features and versions of the containing
actions/runner.

Additionally:

- Fix the user agent so that it more closely aligns with user agent
  spec
- Refactor environment variable initialization so that it all happens in
  one place and call.
- Move Mode, getRequiredEnvParam, setMode, getMode out of actions-util
  and into util. actions-util is meant for utils only called by the
  action, not the runner.

The `prepareLocalRunEnvironment()` method is most likely deprecated and
should be removed. I originally added it because I had a way of working
where I would run the action from my local machine to test out changes,
but this was always a little flaky. So, I no longer use this way of
working. I will probably remove it soon.
2021-06-02 11:06:02 -07:00
Andrew Eisenberg 47588796b4 Send the version and mode with the user agent
This commit changes the way the action determines if running in action
or runner mode. There is now an environment variable that is set at the
beginning of the process and elsewhere in the process, we can check to
see if the variable is set.
2021-05-31 09:03:29 -07:00
David Verdeguer 0c0bc0e6c6 Fix undefined environment 2021-05-05 15:46:49 +02:00
David Verdeguer cd7eedd4a5 Address comments 2021-05-05 12:30:20 +02:00
David Verdeguer 3b741b35ad Use actionsUtil.computeAutomationID on upload-lib 2021-05-03 19:56:04 +02:00
David Verdeguer 519d0771c7 Add actions-util.getAutomationID() 2021-05-03 19:36:32 +02:00
Robert 8c91ba83e2 Introduce our own toolcache implementation for use by the runnner 2021-04-22 15:31:15 +01:00
Robert ca27066d09 fix grammar / punctuation 2021-03-31 11:05:30 +01:00
Robert 2f93805cef check push event 2021-03-30 16:53:02 +01:00
Robert d4edded3ea Add special dependabot error message 2021-03-30 14:09:06 +01:00
Simon Engledew ba14abbca7 Rewrite the ref to correctly point to refs/remotes
Fixes the rev-parse issues caused by https://github.com/github/codeql-action/pull/428
2021-03-25 13:08:55 +00:00
Simon Engledew 9165099103 Skip doing work if it is not necessary 2021-03-22 15:50:04 +00:00
Simon Engledew 36a9516acc PR feedback 2021-03-22 15:09:33 +00:00
Simon Engledew ef92c5ac5f Count the number of parents of the current commit to check it is still a merge
Work around a race condition in actions where sometimes GITHUB_SHA != git rev-parse head
2021-03-22 12:05:00 +00:00
Josh Soref c4fced7348 Fix spelling errors
spelling: executable
spelling: github
spelling: javascript
spelling: latest
spelling: occurred
spelling: parameter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-03-18 09:40:47 -07:00
Andrew Eisenberg ffd96b38fb Ensure error correct error message on 403 error 2021-03-17 07:55:21 -07:00
Chris Gavin 7b72f1c330 Merge main into allow-override-temp. 2021-02-15 11:45:08 +00:00
Chris Gavin 6452109691 Treat empty CODEQL_ACTION_TEMP the same as it not being set. 2021-02-15 11:44:44 +00:00
Simon Engledew 1f07e287da Do not report warning: undefined 2021-02-01 16:32:13 +00:00
Chris Gavin ed751ece83 Allow overriding path of temporary files. 2021-02-01 15:34:13 +00:00
Simon Engledew 44ed1c6ce1 Remove pull request warnings 2021-01-29 10:42:37 +00:00
Simon Engledew ee4d06713e Fix wonky comment 2021-01-22 14:08:43 +00:00
Simon Engledew 6be1f5ce0e Add more granular exception handling 2021-01-22 13:52:04 +00:00
Simon Engledew 8a9922df92 Disambiguate report messages 2021-01-22 13:52:04 +00:00
Simon Engledew 795b1923ec Swap method naming to account for new functionality 2021-01-22 13:52:03 +00:00
Simon Engledew 28e2860afb Correctly report WorkflowMissing 2021-01-22 13:51:45 +00:00
Simon Engledew 4547749a2f Do not warn users if a workflow cannot be read
This will still send a LintFailed message status report.
2021-01-22 13:51:19 +00:00
Simon Engledew 1a6f6a27b3 Implement PR feedback 2021-01-15 08:28:21 +00:00
Simon Engledew 0853901c0d Fix overzealous warning when PR scanning is not required 2021-01-13 12:28:24 +00:00
Simon Engledew 1511db33b3 Only check the steps of the job currently being run 2021-01-04 12:00:15 +00:00
Simon Engledew e89a24b8cb Only report the first CheckoutWrongHead lint error 2020-12-21 11:08:49 +00:00