fogfish/blueprint-serverless-golang

View on GitHub
.github/workflows/check-spawn.yml

Summary

Maintainability
Test Coverage
##
## Spawn Pull Request to sandbox
##
name: spawn
on:
  pull_request:
    types:
      - labeled

jobs:
  it:
    strategy:
      matrix:
        stack:
          - blueprint-golang

    if: github.event.label.name == '[A] deploy'

    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4.1.1

      - id: deploy
        uses: fogfish/deploy-cdk-go@latest
        with:
          go-version: "1.21"
          stack: ${{ matrix.stack }}
          version: pr${{ github.event.number }}
          issue-to-comment: ${{ github.event.number }}
          aws-access-key: ${{ secrets.AWS_ACCESS_KEY }}
          aws-secret-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: eu-west-1

      - uses: assay-it/github-actions-quality-check@latest
        with:
          install-go: false
          system-under-test: ${{ steps.deploy.outputs.deployed-api }}

      - uses: buildsville/add-remove-label@v1
        if: always()
        with:
          token: ${{secrets.GITHUB_TOKEN}}
          label: '[A] deploy'
          type: remove