-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.21 KB
/
deploy-to-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy to space
on:
push:
branches:
- jadudm/tf-0103
workflow_dispatch:
# workflow_call:
# inputs:
# environment:
# required: true
# type: string
jobs:
deploy:
name: apply ( ${{ inputs.environment }} )
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
KEY: "terraform.tfstate.${{ inputs.environment }}"
TF_VAR_cf_user: ${{ secrets.CF_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CF_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Checkout the repository to the runner
- name: Checkout
uses: actions/checkout@v4
- name: Install Terraform
run: |
curl -k -O -L https://github.com/cloudfoundry/cli/releases/download/v8.8.0/cf8-cli-installer_8.8.0_x86-64.deb
sudo apt-get install --assume-yes ./cf8-cli-installer_8.8.0_x86-64.deb
- name: Authenticate against Cloud.gov
run: |
cf api api.fr.cloud.gov
cf auth ${{ secrets.CF_USERNAME }} ${{ secrets.CF_PASSWORD }}
- name: Run `make dev` (terraform init -> plan -> apply)
run: |
pushd ${GITHUB_WORKSPACE}/terraform
make dev
popd