Skip to content

CLOUDP-178750: Add deletion protection to deployments #4113

CLOUDP-178750: Add deletion protection to deployments

CLOUDP-178750: Add deletion protection to deployments #4113

Workflow file for this run

name: Test
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
workflow_dispatch:
concurrency:
group: test-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
allowed:
name: Allowed
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/main' ||
(github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
steps:
- name: allowed message
run: echo "Allowed to run"
- name: check Github action bot comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@v2
id: find-bot-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: github-actions[bot]
body-includes: 'https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit'
- name: edit comment if exists
if: github.event_name == 'pull_request' && steps.find-bot-comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v3
with:
edit-mode: replace
comment-id: ${{ steps.find-bot-comment.outputs.comment-id }}
body: https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit/${{ github.event.pull_request.head.sha }}
- name: comment PR
if: github.event_name == 'pull_request' && steps.find-bot-comment.outputs.comment-id == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }} -R mongodb/mongodb-atlas-kubernetes -b "https://app.codecov.io/github/mongodb/mongodb-atlas-kubernetes/commit/${{ github.event.pull_request.head.sha }}"
unit-tests:
needs: allowed
uses: ./.github/workflows/test-unit.yml
secrets: inherit
with:
forked: false
e2e-tests:
needs: allowed
uses: ./.github/workflows/test-e2e.yml
secrets: inherit
with:
forked: false
openshift-upgrade-test:
needs: allowed
uses: ./.github/workflows/openshift-upgrade-test.yaml
secrets: inherit
with:
forked: false