-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bf7b4d
commit fb67a01
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build infra | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
HOME: ./temp_home | ||
|
||
jobs: | ||
build: | ||
name: Build infrastructure | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.SRC_PREFIX }} | ||
|
||
- name: Install Doppler CLI | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg | ||
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | sudo gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list | ||
sudo apt-get update && sudo apt-get install doppler | ||
- name: Setup Doppler | ||
working-directory: ./oracle | ||
env: | ||
DOPPLER_ACESS_TOKEN: ${{ secrets.DOPPLER_ACCESS_TOKEN }} | ||
run: | | ||
mkdir temp_home | ||
doppler setup --no-interactive -t ${{ secrets.DOPPLER_ACCESS_TOKEN }} | ||
- name: Install Terraform CLI | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | ||
|
||
- name: Run Terraform | ||
working-directory: ./oracle | ||
env: | ||
TF_API_TOKEN: ${{ secrets.TF_API_TOKEN }} | ||
run: | | ||
./scripts/apply_terraform.sh |