Digger Drift Detection #65
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
name: Digger Drift Detection | |
on: | |
workflow_dispatch: | |
schedule: ## 12am daily. | |
- cron: 0 0 * * * | |
env: | |
COLUMNS: 120 | |
jobs: | |
detect-drift: | |
runs-on: ubuntu-latest | |
# Permissions for OIDC with AWS | |
permissions: | |
contents: write # required to merge PRs | |
id-token: write # required for workload-identity-federation | |
pull-requests: write # required to post PR comments | |
statuses: write # required to validate combined PR status | |
steps: | |
- name: Setup Infracost | |
uses: infracost/actions/setup@v3 | |
# See https://github.com/infracost/actions/tree/master/setup for other inputs | |
# If you can't use this action, use Docker image infracost/infracost:ci-0.10 | |
with: | |
api-key: ${{ secrets.INFRACOST_API_KEY }} | |
- name: digger drift detection | |
uses: diggerhq/digger@v0.4.13 | |
with: | |
mode: drift-detection | |
########## | |
# Setup # | |
########## | |
setup-terragrunt: true | |
terragrunt-version: 0.54.12 | |
# terraform-version: v1.5.5 | |
# opentofu-version: v1.6.0-alpha3 | |
setup-checkov: true | |
checkov-version: 2.3.360 | |
################# | |
# AWS Settings # | |
################# | |
setup-aws: true | |
aws-role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/${{ secrets.ROLE_NAME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
#################### | |
# Digger Settings # | |
#################### | |
configure-checkout: true | |
disable-locking: true | |
digger-filename: digger.yaml | |
digger-hostname: https://cloud.digger.dev | |
digger-organisation: develeap | |
digger-token: ${{ secrets.DIGGER_TOKEN }} | |
drift-detection-slack-notification-url: ${{ secrets.DRIFT_DETECTION_SLACK_NOTIFICATION }} | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |