Fix unused import in webhook-receiver #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Complete Elasticsearch Infrastructure | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| AWS_REGION: eu-central-1 | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' | |
| - name: Build webhook-receiver Lambda | |
| working-directory: lambda/webhook-receiver-go | |
| run: | | |
| go mod tidy | |
| GOOS=linux GOARCH=amd64 go build -o bootstrap main.go | |
| zip function.zip bootstrap | |
| - name: Build es-indexer-worker Lambda | |
| working-directory: lambda/es-indexer-worker-go | |
| run: | | |
| go mod tidy | |
| GOOS=linux GOARCH=amd64 go build -o bootstrap main.go | |
| zip function.zip bootstrap | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: ${{ env.AWS_REGION }} | |
| role-to-assume: ${{ secrets.AWS_OIDC }} | |
| - name: Assume CDK Deploy Role | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: ${{ env.AWS_REGION }} | |
| role-to-assume: arn:aws:iam::553637109631:role/cdk-hnb659fds-deploy-role-553637109631-eu-central-1 | |
| role-chaining: true | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: 1.6.0 | |
| terraform_wrapper: false | |
| - name: Terraform Init | |
| working-directory: terraform | |
| run: terraform init -reconfigure | |
| - name: Terraform Plan | |
| working-directory: terraform | |
| run: terraform plan -input=false | |
| env: | |
| TF_VAR_elasticsearch_password: ${{ secrets.ELASTICSEARCH_PASSWORD }} | |
| TF_VAR_elasticsearch_url: ${{ secrets.ELASTICSEARCH_URL }} | |
| TF_VAR_webhook_secret: ${{ secrets.WEBHOOK_SECRET }} | |
| TF_VAR_moresleep_url: ${{ secrets.MORESLEEP_URL }} | |
| TF_VAR_moresleep_username: ${{ secrets.MORESLEEP_USERNAME }} | |
| TF_VAR_moresleep_password: ${{ secrets.MORESLEEP_PASSWORD }} | |
| - name: Terraform Apply | |
| working-directory: terraform | |
| run: terraform apply -auto-approve -input=false | |
| env: | |
| TF_VAR_elasticsearch_password: ${{ secrets.ELASTICSEARCH_PASSWORD }} | |
| TF_VAR_elasticsearch_url: ${{ secrets.ELASTICSEARCH_URL }} | |
| TF_VAR_webhook_secret: ${{ secrets.WEBHOOK_SECRET }} | |
| TF_VAR_moresleep_url: ${{ secrets.MORESLEEP_URL }} | |
| TF_VAR_moresleep_username: ${{ secrets.MORESLEEP_USERNAME }} | |
| TF_VAR_moresleep_password: ${{ secrets.MORESLEEP_PASSWORD }} | |
| - name: Show Outputs | |
| working-directory: terraform | |
| run: | | |
| echo "================================================" | |
| echo "✅ AWS Infrastructure Deployed!" | |
| echo "================================================" | |
| echo "" | |
| echo "🔗 Webhook URL for moresleep:" | |
| terraform output -raw webhook_url | |
| echo "" | |
| echo "" | |
| echo "📦 SQS Queue:" | |
| terraform output -raw sqs_queue_url | |
| echo "" | |
| echo "" | |
| echo "📊 Elasticsearch: Deploy on Coolify (see README)" | |
| echo "================================================" |