Skip to content

add lambda_patching scripts #1

add lambda_patching scripts

add lambda_patching scripts #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
working_directory:
required: true
type: string
function_name:
required: true
type: string
env:
required: true
type: string
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@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ inputs.role_name }}
role-session-name: ${{ inputs.role_session_name }}
aws-region: ${{ inputs.aws_region }}
- name: Build lambdas
run: cd ${{ github.workspace }} && make lambda
env:
GITHUB_TOKEN: ${{ secrets.GB_TOKEN_PRIVATE }}
GOPRIVATE: "github.com/vimeda/*"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: order-srv-lambdas
path: ${{ github.workspace }}/dist/*
- uses: actions/download-artifact@v2
id: download
with:
name: order-srv-lambdas
path: ${{ github.workspace }}/dist
- name: Display structure of downloaded files
run: ls -R
working-directory: ${{ steps.download.outputs.download-path }}
- name: Push function to Bucket
run: cd ${{ github.workspace }}/dist && aws s3 cp ${{ inputs.function_name }}_lambda.zip s3://${{ inputs.env }}-lykon-lambdas/${{ inputs.function_name }}/function.zip
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ~1.0
- name: Terraform Init
id: init
run: terraform -chdir=${{ github.workspace }}/configs/crossplane/${{ inputs.env }} init

Check failure on line 87 in .github/workflows/release-crossplane.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-crossplane.yaml

Invalid workflow file

You have an error in your yaml syntax on line 87
- name: Patch Claim from Parameter store LSS
run: |
# cd ${{ github.workspace }} && ls
cd ${{ inputs.working_directory }} && ls
shell: sh
#
# - name: display claim
# run: |
# cat ${{ github.workspace }}/configs/crossplane/${{ inputs.env }}/claims.yaml
# shell: sh
# - name: Terraform apply
# id: apply
# run: |
# pwd
# echo "${{ secrets.STAGING_KUBECONFIG }}" > ${{ github.workspace }}/kubeconfig.yaml
# export KUBECONFIG=${{ github.workspace }}/kubeconfig.yaml
# terraform -chdir=${{ github.workspace }}/configs/crossplane/${{ inputs.env }} apply -auto-approve -input=false -var-file=staging.tfvars.json
# env:
# TF_WORKSPACE: ${{ inputs.env }}