forked from grey/example-deployable-app
Not working, but bedtime
This commit is contained in:
parent
55b3e74aa2
commit
3574c82a66
6 changed files with 49 additions and 2 deletions
7
.actrc
Normal file
7
.actrc
Normal file
|
@ -0,0 +1,7 @@
|
|||
--action-cache-path .github/cache/act/actions
|
||||
--artifact-server-path .github/cache/act/artifacts
|
||||
--artifact-server-port 18412
|
||||
--cache-server-path .github/cache/act/cache
|
||||
--use-new-action-cache
|
||||
--pull=false
|
||||
--platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
|
20
.github/workflows/deploy.yml
vendored
Normal file
20
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: opentofu/setup-opentofu@v1
|
||||
- run: tofu init
|
||||
- run: tofu apply -no-color
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
/.terraform
|
||||
/terraform.tfstate*
|
||||
/.terraform.tfstate*
|
||||
/.github/cache
|
||||
|
|
|
@ -9,6 +9,7 @@ We're gonna need some tools:
|
|||
|
||||
* OpenTofu, the replacement for Terraform since Hashicorp changed the licence terms: https://opentofu.org/docs/intro/install/.
|
||||
* As Tofu is a drop in replacement for Terraform, you can use Terraform if you prefer, and I'll refer to them interchangeably.
|
||||
* Nektos/Act so we can run our GitHub Actions locally. https://github.com/nektos/act/releases
|
||||
|
||||
## What have we got going on in here?
|
||||
The main players:
|
||||
|
|
18
docker.tf
18
docker.tf
|
@ -1,3 +1,17 @@
|
|||
provider "docker" {
|
||||
host = "ssh://california.ti"
|
||||
provider "ssh" {
|
||||
server = "california.ti"
|
||||
user = "techinc"
|
||||
auth = {
|
||||
private_key = {
|
||||
content = file("~/.ssh/keys/exploding_bolts_2_rsa")
|
||||
}
|
||||
}
|
||||
}
|
||||
data "ssh_tunnel" "docker" {
|
||||
remote = {
|
||||
socket = "/var/run/docker.sock"
|
||||
}
|
||||
}
|
||||
provider "docker" {
|
||||
host = "tcp://${data.ssh_tunnel.docker.local.address}"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,9 @@ terraform {
|
|||
source = "hashicorp/random"
|
||||
version = "~>3.3"
|
||||
}
|
||||
ssh = {
|
||||
source = "matthewbaggett/ssh"
|
||||
version = "~> 0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue