WIP-20240824125026 #29
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: Install Prometheus Operator using Terraform and Helm in Docker | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
install-prometheus-operator: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
cli_config_credentials_token: ${{ secrets.TFE_TOKEN }} | ||
- name: Create kubeconfig file | ||
run: echo "${{ secrets.KUBECONFIG_DATA }}" > $HOME/.kube/config | ||
- name: Terraform Init | ||
env: | ||
KUBECONFIG: $HOME/.kube/config | ||
run: terraform -chdir=monitoring init | ||
- name: Terraform Plan | ||
env: | ||
KUBECONFIG=$HOME/.kube/config | ||
Check failure on line 34 in .github/workflows/install-prometheus-operator.yml GitHub Actions / Install Prometheus Operator using Terraform and Helm in DockerInvalid workflow file
|
||
run: terraform -chdir=monitoring plan | ||
- name: Terraform Apply | ||
env: | ||
KUBECONFIG: $HOME/.kube/config | ||
if: github.ref == 'refs/heads/main' | ||
run: terraform -chdir=monitoring apply -auto-approve |