This action installs cloud custodian and adds it to the $PATH
.
It also supports installing the c7n_azure
and c7n_gcp
extensions via action inputs.
name | type | default | description |
---|---|---|---|
include-gcp | boolean | false | set to true to install the c7n_gcp extension |
include-azure | boolean | false | set to true to install the c7n_azure extension |
include-c7n-org | boolean | false | set to true to install c7n-org and add it to the $PATH |
This action is tested and working with Ubuntu
GitHub Hosted runners. It requires python3
.
name: My workflow
on:
schedule:
- cron: "00,30 * * * *"
jobs:
run-my-policy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gscho/setup-cloud-custodian@v1
- run: custodian run -s out path/to/my-policy.yml
name: My workflow
on:
schedule:
- cron: "00,30 * * * *"
jobs:
run-my-policy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gscho/setup-cloud-custodian@v1
with:
include-azure: true
include-gcp: true
- run: custodian run -s out path/to/my-policy.yml
name: My workflow
on:
schedule:
- cron: "00,30 * * * *"
jobs:
run-my-policy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gscho/setup-cloud-custodian@v1
with:
include-c7n-org: true
- run: c7n-org run -c accounts-all.yaml -u my-policy -s output-dir -r us-east-1
name: My workflow
on:
workflow_dispatch:
jobs:
print-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gscho/setup-cloud-custodian@v1
with:
custodian-version: '0.9.7.0'
- run: custodian version