Not working, but bedtime

This commit is contained in:
Greyscale 2024-06-14 04:33:27 +02:00
parent 55b3e74aa2
commit 3574c82a66
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2
6 changed files with 49 additions and 2 deletions

7
.actrc Normal file
View 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
View 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
View file

@ -2,3 +2,4 @@
/.terraform /.terraform
/terraform.tfstate* /terraform.tfstate*
/.terraform.tfstate* /.terraform.tfstate*
/.github/cache

View file

@ -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/. * 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. * 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? ## What have we got going on in here?
The main players: The main players:

View file

@ -1,3 +1,17 @@
provider "docker" { provider "ssh" {
host = "ssh://california.ti" 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}"
} }

View file

@ -8,5 +8,9 @@ terraform {
source = "hashicorp/random" source = "hashicorp/random"
version = "~>3.3" version = "~>3.3"
} }
ssh = {
source = "matthewbaggett/ssh"
version = "~> 0.1.0"
}
} }
} }