diff --git a/.github/workflows/release-spec-prod.yml b/.github/workflows/release-spec-prod.yml index 6eedf21b7..b2ee0d843 100644 --- a/.github/workflows/release-spec-prod.yml +++ b/.github/workflows/release-spec-prod.yml @@ -6,7 +6,8 @@ on: permissions: contents: write jobs: - run-validations: + # Required validations will stop the release if they fail + run-required-validations: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -15,12 +16,14 @@ jobs: env: SPECTRAL_VERSION: ${{ vars.SPECTRAL_VERSION }} run: npx -- @stoplight/spectral-cli@"${SPECTRAL_VERSION}" lint ./tools/cli/test/data/openapi-foas*.{yml,yaml} --ruleset=.spectral.yaml # we will update this to lint the FOAS in CLOUDP-263186 - - name: Validate the FOAS can be used to generate Postman collection - run: | - cp -rf "./tools/cli/test/data/openapi-foas-dev.json" "./tools/postman/openapi/atlas-api.json" - pushd tools/postman - make convert_to_collection - popd + - name: Create Issue + if: ${{ failure() }} + uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd + with: + labels: failed-release + title: "(PROD) Required Spectral validation failed :scream_cat:" + body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + token: ${{ secrets.API_BOT_PAT }} - name: Install Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 with: @@ -36,4 +39,33 @@ jobs: cp -rf "./tools/cli/test/data/openapi-foas-dev.yaml" "atlas-sdk-go/openapi/atlas-sdk.yaml" pushd atlas-sdk-go make -e openapi-pipeline - + popd + - name: Create Issue + if: ${{ failure() }} + uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd + with: + labels: failed-release + title: "(PROD) Required GO SDK validation failed :scream_cat:" + body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + token: ${{ secrets.API_BOT_PAT }} + + # Optional validations won't stop the release but only open a GH issue if they fail + run-optional-validations: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - name: Validate the FOAS can be used to generate Postman collection + run: | + cp -rf "./tools/cli/test/data/openapi-foas-dev.json" "./tools/postman/openapi/atlas-api.json" + pushd tools/postman + make convert_to_collection + popd + - name: Create Issue + if: ${{ failure() }} + uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd + with: + labels: failed-release + title: "(PROD) Optional Postman validation failed :scream_cat:" + body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + token: ${{ secrets.API_BOT_PAT }}