Skip to content

Add a workflow

Add a workflow #72

Workflow file for this run

name: 'Example'
on:
pull_request:
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
graph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip3 install tfdiagrams==0.3.0
- uses: ts-graphviz/setup-graphviz@v2
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.4"
- name: Generate graph
run: |
cd example/count && terraform init && terraform graph | tfdot -ograph.png
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}