Nicholas McDonnell
71a88a5694
Remove usage of set-output from our GitHub Actions workflow
...
GitHub has deprecated the set-output command per:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
This updates the GitHub Actions workflow to use the newly preferred
method to set the output for a job's step.
1 year ago
dependabot[bot]
1f7c62e5f2
Bump actions/setup-python from 3 to 4
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
dependabot[bot]
2775dfa470
Bump hashicorp/setup-terraform from 1 to 2
...
Bumps [hashicorp/setup-terraform](https://github.com/hashicorp/setup-terraform ) from 1 to 2.
- [Release notes](https://github.com/hashicorp/setup-terraform/releases )
- [Changelog](https://github.com/hashicorp/setup-terraform/blob/main/CHANGELOG.md )
- [Commits](https://github.com/hashicorp/setup-terraform/compare/v1...v2 )
---
updated-dependencies:
- dependency-name: hashicorp/setup-terraform
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Nicholas McDonnell
fc55e84feb
Update the version of Go used from 1.18 to 1.19
...
Go 1.19 was released while this branch was in the wings and it makes
sense to bump to the latest Go release.
1 year ago
Nicholas McDonnell
8f6849857b
Update the version of Go used from 1.16 to 1.18
...
Go 1.16 is no longer supported as of the release of 1.18 so it makes
sense to update to the latest version available.
2 years ago
Nicholas McDonnell
57b4abe8fd
Update actions/setup-go from v2 to v3
...
Additionally as of v3.1.0 of actions/setup-go there is a go-version
output value to retrieve the version of Go installed by the Action.
This allows us to remove the step to manually retrieve this information
from the Go executable.
2 years ago
dependabot[bot]
c576ef56fb
Bump actions/cache from 2 to 3
...
Bumps [actions/cache](https://github.com/actions/cache ) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases )
- [Commits](https://github.com/actions/cache/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Nicholas McDonnell
e22c12cbd4
Use consistent quoting for software versions
2 years ago
Nicholas McDonnell
583992602c
Upgrade from Python 3.9 to 3.10 for the `lint` job in GHA
2 years ago
dependabot[bot]
3406c2d420
Bump actions/checkout from 2 to 3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
dependabot[bot]
4ee1bfd96b
Bump actions/setup-python from 2 to 3
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Nicholas McDonnell
8797e110d3
Store Go version as a step output
...
This changes from using an environment variable to using a step output to store
the Go version that is installed. This mirrors changes made to the other
program versions and how they're stored.
3 years ago
Nicholas McDonnell
2699e09eb7
Use setup-env outputs for Terraform-docs version
...
We change the "Install Terraform-docs" step to use two local environment
variables to provide the package's URL and version to install. This allows us
to work around `yamllint` line length limits.
3 years ago
Nicholas McDonnell
0851598edd
Use setup-env outputs for shfmt version
...
We change the "Install shfmt" step to use two local environment variables to
provide the package's URL and version to install. This allows us to work around
`yamllint` line length limits.
3 years ago
Nicholas McDonnell
64b24714ac
Use setup-env outputs for Packer version
...
We use a `PACKER_VERSION` environment variable for the "Install Packer" step
that is populated from the `setup-env` outputs to get around `yamllint` lint
length limits.
3 years ago
Nicholas McDonnell
1e16136272
Use setup-env outputs for Terraform version
...
Change from using an environment variable to the outputs of the
cisagov/setup-env-github-action instead.
3 years ago
Nicholas McDonnell
6cf78c02e1
Use an id when using cisagov/setup-env-github-action
3 years ago
David Redmin
b51dbb577e
Revert "Temporarily use cisagov/setup-env-github-action@improvement/support_tf_0.13"
...
This reverts commit 6a7fbf07bd
.
3 years ago
David Redmin
895a692ad8
Remove lint job step to initialize Terraform directories
...
Initialization will now be done during the "terraform validate" step.
3 years ago
David Redmin
6a7fbf07bd
Temporarily use cisagov/setup-env-github-action@improvement/support_tf_0.13
...
This change will be reverted when testing is completed.
3 years ago
Nicholas McDonnell
f7140d8116
Use the hashicorp/setup-terraform Action
...
Instead of manually installing a Terraform binary we can leverage the Action
provided by Hashicorp to do the same thing.
3 years ago
Nicholas McDonnell
e2a729d0b1
Install the shfmt tool for GHA
...
The `shfmt` tool does not ship on the GitHub Actions runners so we must install
it manually.
3 years ago
Shane Frasier
8ee2116f42
Prefer the newer "go install" syntax
...
As of [Go 1.16](https://tip.golang.org/doc/go1.16#go-command ) the `GO111MODULE` environment variable defaults to `on` and `go get` has been deprecated for module installation.
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Shane Frasier
337d1efb8f
Capitalize Go for consistency
...
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Jeremy Frasier
bb6e566e3a
Move go installation so that it takes place before the cache task
...
Some variables defined in the go installation are used in the cache
task, so the go installation must happen first.
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Jeremy Frasier
181d1b2faf
Install a specific version of terraform-docs
...
Note that this change is dependent on the merging of
cisagov/setup-env-github-action#31 .
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Jeremy Frasier
b629f7f623
Modify the Packer installation to model that of Terraform
...
The Terraform installation does not destroy the existing system
Terraform installation, and neither should the Packer installation.
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Jeremy Frasier
70414cff28
Remove unnecessary line in tasks
...
There is no reason to create /usr/bin/terraform. This is a vestige of
an earlier age.
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Shane Frasier
c481043981
Break out the curl cache creation into its own step
...
Co-authored-by: Nick M. <50747025+mcdonnnj@users.noreply.github.com>
3 years ago
Jeremy Frasier
106af21c04
Install terraform and packer for the linting job
...
We should be doing this because the Packer and Terraform pre-commit
hooks leverage the corresponding executables; therefore, it makes
sense to go ahead and install the particular versions of those
executables that we support. Also add support for optionally
debugging via tmate.
See also cisagov/skeleton-generic#74 .
3 years ago
Nicholas McDonnell
f4131e57d8
Clean up our actions/cache step
...
Removed name because it was not more informative than the default. Swapped out
a hardcoded job reference for the github.job context value. Switch the base
cache key to a step environment value so we can set it once and reuse. Removed
additional restore-key value that might have undesirable results.
3 years ago
Jeremy Frasier
02c5a6f8bf
Use the python version output by actions/setup-python
...
There is no need to run python code to determine the python version.
Resolves #58 .
See here for details:
https://github.com/actions/setup-python/blob/main/action.yml#L14-L16
4 years ago
Felddy
c9c00f1d03
Replace deprecated set-env workflow syntax
...
See:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
4 years ago
Felddy
6a4164dfba
Bump build workflow python-version to 3.9
4 years ago
Nicholas McDonnell
ae4aa123c8
Update lint job to resolve #49
4 years ago
Nicholas McDonnell
969efdd0bb
Adjust cache key name
...
Make the job name the first part of the cache key since
it is the only part that isn't variable.
4 years ago
Nicholas McDonnell
6ab69f4f51
Bump actions/setup-python to v2
...
Keep it up-to-date even though we are not currently
using features added in v2.
4 years ago
Nicholas McDonnell
d6fe79dce3
Update actions/cache to v2
...
Switch the workflow to use cachev2. This puts us up to
date and allows us to consolidate into one cache item.
4 years ago
Felddy
8c99c5294a
Allow events from apb to rebuild this repository weekly.
4 years ago
Nicholas McDonnell
1f3d440a1a
Rename action to accurately reflect that we are only linting, not building.
...
Adjust description for pre-commit hook setup to better convey what is being
done.
4 years ago
Nicholas McDonnell
b01a0ee7bd
Explicitly install pre-commit hooks as its own step so it's clearer when the
...
failure is with setup rather than hooks running.
4 years ago
Nicholas McDonnell
478f1688a1
Change the cache paths from hardcoded values in their appropriate blocks to environment variables declared before the job block.
4 years ago
Nicholas McDonnell
454864bc02
Incorporate the Python version into keys for pip and pre-commit caches.
...
This should resolve the issue seen when the Python version changes before there
is an update to .pre-commit-config.yml which results in pre-commit pointing to
a non-existent Python installation.
4 years ago
Nicholas McDonnell
e96577bce4
All references to '-r' for pip calls have been replaced with the more verbose '--requirement'.
4 years ago
Nicholas McDonnell
d99fd00bc2
Flip cache order to mirror how it is done downstream.
4 years ago
Nicholas McDonnell
f7a4166ad6
Update Python version used to 3.8
...
Update actions/checkout to v2
Update formatting to match downstream children
4 years ago
Jeremy Frasier
dbd589d2e2
Improve list formatting
4 years ago
Jeremy Frasier
2fa4cbe194
Make workflow run when a PR is opened, synchronized, or reopened
...
A user forked cisagov/scan-target-data and created a pull request, but
the required GitHub Action(s) did not run. This is presumably because
the user does not have Actions enabled in his or her fork. Ideally,
the required Action(s) would run in cisagov/scan-target-data when a PR
to merge changes back is created. Based on my reading of this link,
adding the "pull_request" event type should make this happen:
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-events-for-forked-repositories
4 years ago
Felddy
99c611557e
Remove search for previous pre-commit caches.
...
These seem to be very large caches. Restoring an old one and updating
it results in a cache larger than the maximum allowed cache size: 200MB.
"Cache size of 254757924 bytes is over the 200MB limit, not saving
cache."
So if the config changes it is best to just take the cache-miss and
start from scratch.
5 years ago
Felddy
5d5567d303
Add GitHub action caching of pre-commit hooks and pip packages.
5 years ago