Skip to content

Commit

Permalink
gha
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jul 20, 2024
1 parent 96000ca commit 6bb454d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 38 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/apply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Apply org changes"

on:
push:
branches:
- main
paths:
- 'terraform/production/*.tfvars'

jobs:
apply-changes:
name: "Org changes plan"
runs-on: ubuntu-latest

permissions:
pull-requests: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: terraform apply
uses: dflook/terraform-apply@v1
env:
TERRAFORM_ACTIONS_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: "terraform"
variables: |
github_token = "${{ secrets.TERRAFORM_MANAGEMENT_GITHUB_TOKEN }}"
var_file: |
terraform/production/org.tfvars
terraform/production/repositories.tfvars
terraform/production/teams.tfvars
38 changes: 0 additions & 38 deletions .github/workflows/new_team.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
pull_request:
branches:
- main
paths:
- 'terraform/production/*.tfvars'

jobs:
plan-changes:
Expand Down

0 comments on commit 6bb454d

Please sign in to comment.