Merge pull request #203 from cloud-neutral-workshop/codex/fix-invalid-function-argument-error-j7et4s
Add gitops_repo_name input to AWS workflows
This commit is contained in:
commit
e276310077
@ -13,6 +13,14 @@ on:
|
||||
type: choice
|
||||
options: [plan, apply, destroy]
|
||||
default: plan
|
||||
gitops_repo_name:
|
||||
description: "GitOps repository (URL or owner/repo)"
|
||||
type: string
|
||||
default: https://github.com/cloud-neutral-workshop/gitops.git
|
||||
gitops_repo_ref:
|
||||
description: "GitOps repo ref (branch/tag/sha) to use"
|
||||
type: string
|
||||
default: main
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
@ -25,6 +33,8 @@ env:
|
||||
CONFIG_FILES: |
|
||||
gitops/xzerolab/sit/aws-cloud/account/bootstrap.yaml
|
||||
gitops/xzerolab/sit/aws-cloud/resources/vpc.yaml
|
||||
GITOPS_REPO_ROOT: gitops
|
||||
GITOPS_BOOTSTRAP_CONFIG: gitops/xzerolab/sit/aws-cloud/account/bootstrap.yaml
|
||||
|
||||
jobs:
|
||||
terraform:
|
||||
@ -44,8 +54,9 @@ jobs:
|
||||
- name: Checkout GitOps config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: cloud-neutral-workshop/gitops
|
||||
path: gitops
|
||||
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
|
||||
path: ${{ env.GITOPS_REPO_ROOT }}
|
||||
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}
|
||||
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
|
||||
@ -16,11 +16,25 @@ on:
|
||||
type: choice
|
||||
options: [plan, apply, destroy]
|
||||
default: plan
|
||||
gitops_repo_ref:
|
||||
description: "GitOps repo ref (branch/tag/sha) to use"
|
||||
type: string
|
||||
default: main
|
||||
gitops_repo_name:
|
||||
description: "GitOps repository (URL or owner/repo)"
|
||||
type: string
|
||||
default: https://github.com/cloud-neutral-workshop/gitops.git
|
||||
gitops_bootstrap_config:
|
||||
description: "Path to bootstrap config file within the GitOps repo"
|
||||
type: string
|
||||
default: config/xzerolab/sit/aws-cloud/account/bootstrap.yaml
|
||||
|
||||
env:
|
||||
TG_ROOT: terraform-hcl-standard/aws-cloud/bootstrap
|
||||
DEPLOY_ACTION: ${{ github.event.inputs.deploy_action || 'plan' }}
|
||||
TG_VERSION: 0.67.14
|
||||
GITOPS_REPO_ROOT: gitops
|
||||
GITOPS_BOOTSTRAP_CONFIG: ${{ github.event.inputs.gitops_bootstrap_config || 'config/xzerolab/sit/aws-cloud/account/bootstrap.yaml' }}
|
||||
|
||||
jobs:
|
||||
bootstrap:
|
||||
@ -30,6 +44,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout GitOps config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
|
||||
path: ${{ env.GITOPS_REPO_ROOT }}
|
||||
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}
|
||||
|
||||
- name: Document Bootstrap Scope
|
||||
run: |
|
||||
cat <<'SUMMARY' >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
@ -20,12 +20,21 @@ on:
|
||||
type: choice
|
||||
options: ['true', 'false']
|
||||
default: 'true'
|
||||
gitops_repo_name:
|
||||
description: "GitOps repository (URL or owner/repo)"
|
||||
type: string
|
||||
default: https://github.com/cloud-neutral-workshop/gitops.git
|
||||
gitops_repo_ref:
|
||||
description: "GitOps repo ref (branch/tag/sha) to use"
|
||||
type: string
|
||||
default: main
|
||||
|
||||
env:
|
||||
TF_WORKDIR: terraform-hcl-standard/aws-cloud
|
||||
DEPLOY_ACTION: ${{ github.event.inputs.deploy_action || 'plan' }}
|
||||
AWS_REGION: ap-northeast-1
|
||||
AWS_ROLE_ARN: arn:aws:iam::950604983695:role/GithubAction_IAC_Deploy_Role
|
||||
GITOPS_REPO_ROOT: gitops
|
||||
|
||||
jobs:
|
||||
# -------------------------------------------------------
|
||||
@ -38,6 +47,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout GitOps config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
|
||||
path: ${{ env.GITOPS_REPO_ROOT }}
|
||||
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}
|
||||
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: 1.9.5
|
||||
|
||||
@ -13,6 +13,14 @@ on:
|
||||
type: choice
|
||||
options: [plan, apply, destroy]
|
||||
default: plan
|
||||
gitops_repo_name:
|
||||
description: "GitOps repository (URL or owner/repo)"
|
||||
type: string
|
||||
default: https://github.com/cloud-neutral-workshop/gitops.git
|
||||
gitops_repo_ref:
|
||||
description: "GitOps repo ref (branch/tag/sha) to use"
|
||||
type: string
|
||||
default: main
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
@ -23,6 +31,7 @@ env:
|
||||
AWS_REGION: ap-northeast-1
|
||||
DEPLOY_ACTION: ${{ github.event.inputs.deploy_action || 'plan' }}
|
||||
AWS_ROLE_ARN: arn:aws:iam::950604983695:role/GithubAction_IAC_Deploy_Role
|
||||
GITOPS_REPO_ROOT: gitops
|
||||
|
||||
jobs:
|
||||
terraform:
|
||||
@ -39,6 +48,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout GitOps config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ replace(replace(github.event.inputs.gitops_repo_name || 'https://github.com/cloud-neutral-workshop/gitops.git', 'https://github.com/', ''), '.git', '') }}
|
||||
path: ${{ env.GITOPS_REPO_ROOT }}
|
||||
ref: ${{ github.event.inputs.gitops_repo_ref || 'main' }}
|
||||
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: 1.9.5
|
||||
|
||||
Loading…
Reference in New Issue
Block a user