Skip to content

Commit

Permalink
Do more work in the workflow
Browse files Browse the repository at this point in the history
Lets avoid bash scripts.
  • Loading branch information
jadudm committed Jan 5, 2025
1 parent cd39054 commit faffed1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/deploy-to-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ jobs:
# Checkout the repository to the runner
- name: Checkout
uses: actions/checkout@v4
# `make dev`
- name: Terraform init ; plan ; apply
run: terraform/bin/deploy-dev.bash
- 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
10 changes: 0 additions & 10 deletions terraform/bin/deploy-dev.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
# This script runs in the GH Actions environment.
# Running and testing locally will not work.

sudo apt-get update
sudo apt-get install -y zip python

# Install CF CLI
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

# Authenticate against Cloud.gov
cf api api.fr.cloud.gov
cf auth ${{ secrets.CF_USERNAME }} ${{ secrets.CF_PASSWORD }}

# Run the Terraform for deploying to `dev`
pushd ${GITHUB_WORKSPACE}/terraform
Expand Down

0 comments on commit faffed1

Please sign in to comment.