-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
398 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: setup | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
|
||
concurrency: | ||
# only allow one job per PR running | ||
# older pending jobs will be cancelled not to waste CI minutes | ||
# cannot use github.job here https://github.com/community/community/discussions/13496 | ||
group: ${{ github.workflow }}-setup-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Chalk | ||
uses: ./ | ||
|
||
- name: Verify Setup | ||
run: | | ||
echo 'log_level: "trace"' | sudo tee /etc/chalk.conf | ||
set -x | ||
which chalk | ||
which docker | ||
chalk version | ||
docker version |
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 @@ | ||
tags |
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,45 @@ | ||
# Setup Chalk | ||
|
||
GitHub Action to setting up [Chalk]. | ||
|
||
This action will install `chalk` and will also wrap other commands | ||
`chalk` supports such as `docker`. | ||
|
||
## Usage | ||
|
||
```yaml | ||
name: ci | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
buildx: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Chalk | ||
uses: crashappsec/setup-chalk-version | ||
``` | ||
## Customizing | ||
The following parameters can be provided to the action. | ||
| Name | Type | Default | Description | | ||
| --------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------- | | ||
| `version` | String | | Version of chalk to install. By default latest version is installed. See [releases] for all available versions. | | ||
| `load` | String | | Chalk config to load. Can be either path to a file or an URL. | | ||
|
||
For example: | ||
|
||
```yaml | ||
- name: Set up Chalk | ||
uses: crashappsec/setup-chalk-version | ||
with: | ||
version: "0.1.2" | ||
``` | ||
|
||
[chalk]: https://github.com/crashappsec/chalk/ | ||
[releases]: https://crashoverride.com/releases |
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,37 @@ | ||
name: Setup Chalk | ||
description: Install chalk and wrap supported commands | ||
|
||
inputs: | ||
version: | ||
description: | | ||
Version of chalk to install. | ||
By default latest version is installed. | ||
See https://crashoverride.com/releases for all available versions. | ||
required: false | ||
load: | ||
description: | | ||
Chalk config to load. | ||
Can be either path to a file or an URL. | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# https://docs.sigstore.dev/system_config/installation/ | ||
- name: Install cosign | ||
uses: sigstore/cosign-installer@main | ||
|
||
- name: Add Chalk to PATH | ||
shell: bash | ||
run: | | ||
echo "$HOME/.chalk/bin" >> $GITHUB_PATH | ||
- name: Set up chalk | ||
shell: bash | ||
working-directory: ${{ github.action_path }} | ||
run: | | ||
./setup.sh \ | ||
--version=${{ inputs.version }} \ | ||
--load=${{ inputs.load }} \ | ||
--prefix=$HOME/.chalk \ | ||
${{ runner.debug == '1' && '--debug' || '' }} |
Oops, something went wrong.