Skip to content

create-space

create-space #5

Workflow file for this run

name: create-space
on:
workflow_dispatch:
inputs:
dns_prefix:
required: true
type: string
jobs:
create-space:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.4.7"
- name: Create file for space
run : |
cat > ${{ github.actor }}.software-engineer.space.tf << EOF
module "${{ inputs.dns_prefix }}" {
source = "./modules/software-engineer-space"
github_handle = "${{ github.actor }}"
domain_prefix = "${{ inputs.dns_prefix }}"
cloudflare_zone_id = cloudflare_zone.software-engineer-space.id
providers = {
cloudflare = cloudflare
github = github
}
}
EOF
- name: Commit the new file for space
run: |
git config user.name github-actions
git config user.email [email protected]
git add ${{ github.actor }}.software-engineer.space.tf
git commit -am "Add space for ${{ github.actor }} as ${{ inputs.dns_prefix }}.software-engineer.space.tf"
git push
- name: Run terraform
run: |
terraform init
terraform apply -auto-approve
terraform apply -auto-approve
with:

Check failure on line 46 in .github/workflows/create-space.yml

View workflow run for this annotation

GitHub Actions / create-space

Invalid workflow file

The workflow is not valid. .github/workflows/create-space.yml (Line: 46, Col: 7): Unexpected value 'with'
TF_VAR_CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TF_VAR_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}