generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into devsecops/bethbeza/manage-dependabot-schedule
- Loading branch information
Showing
405 changed files
with
101,692 additions
and
49,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Checksum Validate Action | ||
|
||
[![Test Action](https://github.com/JosiahSiegel/checksum-validate-action/actions/workflows/test_action.yml/badge.svg)](https://github.com/JosiahSiegel/checksum-validate-action/actions/workflows/test_action.yml) | ||
|
||
## Synopsis | ||
|
||
1. Generate a checksum from either a string or shell command (use command substitution: `$()`). | ||
2. Validate if checksum is identical to input (even across multiple jobs), using a `key` to link the validation attempt with the correct generated checksum. | ||
* Validation is possible across jobs since the checksum is uploaded as a workflow artifact | ||
|
||
## Usage | ||
|
||
```yml | ||
jobs: | ||
generate-checksums: | ||
name: Generate checksum | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Generate checksum of string | ||
uses: ./.github/actions/checksum-validate@ebdf8c12c00912d18de93c483b935d51582f9236 | ||
with: | ||
key: test string | ||
input: hello world | ||
|
||
- name: Generate checksum of command output | ||
uses: ./.github/actions/checksum-validate@ebdf8c12c00912d18de93c483b935d51582f9236 | ||
with: | ||
key: test command | ||
input: $(cat action.yml) | ||
|
||
validate-checksums: | ||
name: Validate checksum | ||
needs: | ||
- generate-checksums | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Validate checksum of valid string | ||
id: valid-string | ||
uses: ./.github/actions/checksum-validate@ebdf8c12c00912d18de93c483b935d51582f9236 | ||
with: | ||
key: test string | ||
validate: true | ||
fail-invalid: true | ||
input: hello world | ||
|
||
- name: Validate checksum of valid command output | ||
id: valid-command | ||
uses: ./.github/actions/checksum-validate@ebdf8c12c00912d18de93c483b935d51582f9236 | ||
with: | ||
key: test command | ||
validate: true | ||
fail-invalid: true | ||
input: $(cat action.yml) | ||
|
||
- name: Get outputs | ||
run: | | ||
echo ${{ steps.valid-string.outputs.valid }} | ||
echo ${{ steps.valid-command.outputs.valid }} | ||
``` | ||
## Workflow summary | ||
### ✅ test string checksum valid ✅ | ||
### ❌ test string checksum INVALID ❌ | ||
## Inputs | ||
```yml | ||
inputs: | ||
validate: | ||
description: Check if checksums match | ||
default: false | ||
key: | ||
description: String to keep unique checksums separate | ||
required: true | ||
fail-invalid: | ||
description: Fail step if invalid checksum | ||
default: false | ||
input: | ||
description: String or command for checksum | ||
required: true | ||
``` | ||
## Outputs | ||
```yml | ||
outputs: | ||
valid: | ||
description: True if checksums match | ||
``` |
Oops, something went wrong.