Skip to content

add tofu auto-deployment workflows #1

add tofu auto-deployment workflows

add tofu auto-deployment workflows #1

Workflow file for this run

name: Create OpenTofu plan
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
plan:
runs-on: ubuntu-latest
name: Create a plan for the changes introduced
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOMAD_ADDR: ${{ vars.NOMAD_ADDR }}
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: checkout
uses: actions/checkout@v4
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.TF_SSH_PRIVATE_KEY }}
- name: tofu plan
uses: dflook/tofu-plan@v1
with:
label: dsekt-infra
variables: |
hcloud_token = "${{ secrets.TF_HCLOUD_TOKEN }}"
cloudflare_api_token = "${{ secrets.TF_CLOUDFLARE_TOKEN }}"
ssh_user = "${{ vars.TF_SSH_USER }}"