Configure Copilot Code Review for the provider repo #1629
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release-v* | |
| pull_request: | |
| branches: | |
| - main | |
| - release-v* | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: read-all | |
| jobs: | |
| ci: | |
| name: Continuous Integration | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set-up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - run: make tools | |
| - run: make build | |
| - run: make test | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set-up Go | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Set-up Terraform | |
| uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0 | |
| with: | |
| terraform_version: latest | |
| terraform_wrapper: false | |
| - run: make checkdocs | |
| - run: make validatedocs | |
| - uses: rvben/rumdl@9a78b143c00cc273fa0636410b91ec9acde1004a # v0.1.90 | |
| with: | |
| path: ./docs | |
| report-type: annotations | |
| check: | |
| name: Check | |
| needs: | |
| - ci | |
| - docs | |
| if: always() | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Check | |
| run: | | |
| set -euo pipefail | |
| results=( ${{ join(needs.*.result, ' ') }} ) | |
| for result in "${results[@]}"; do | |
| if [[ "${result}" == "failure" ]] || [[ "${result}" == "cancelled" ]]; then | |
| echo "::error::Workflow failed!" | |
| exit 1 | |
| fi | |
| done |