Skip to content

add v2 main crossplane #1

add v2 main crossplane

add v2 main crossplane #1

on:
workflow_call:
inputs:
role_name:
required: true
type: string
role_session_name:
required: true
type: string
aws_region:
required: false
type: string
default: eu-central-1
namespace:
required: true
type: string
release_name:
required: true
type: string
image_tag:
required: true
type: string
working_directory:
required: true
type: string
default: configs/crossplane
permissions:
id-token: write
contents: read
pull-requests: write
statuses: write
jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: ${{ inputs.working_directory }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configure AWS Credentials
id: aws
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ inputs.role_name }}
role-session-name: ${{ inputs.role_session_name }}
aws-region: image_tag
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ~1.4
- name: Create Kubeconfig file for staging
run: 'echo "$STAGING_KUBECONFIG" > /home/runner/config'
shell: bash
env:
STAGING_KUBECONFIG: ${{secrets.STAGING_KUBECONFIG}}
- name: Terraform apply
id: apply
run: |
echo "${{ secrets.STAGING_KUBECONFIG }}" > ${{ github.workspace }}/kubeconfig.yaml
export KUBECONFIG=${{ github.workspace }}/kubeconfig.yaml
cd ${{ github.workspace }}/configs/crossplane && terraform init && terraform -chdir=${{ github.workspace }}/configs/crossplane apply -auto-approve
env:
TF_WORKSPACE: ${{ inputs.env }}
TF_VAR_image_tag: ${{ inputs.image_tag: }}

Check failure on line 73 in .github/workflows/main-crossplane-v2.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/main-crossplane-v2.yaml

Invalid workflow file

You have an error in your yaml syntax on line 73