Skip to content

211 fix code scanning alert spring boot crafted http requests may lead to debial of service dos #140

211 fix code scanning alert spring boot crafted http requests may lead to debial of service dos

211 fix code scanning alert spring boot crafted http requests may lead to debial of service dos #140

Workflow file for this run

name: Pull Request Close
on:
pull_request:
types:
- closed
env:
REGISTRY: ghcr.io
NAME: ${{ github.event.repository.name }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
# Clean up OpenShift when PR closed, no conditions
cleanup-openshift:
name: Cleanup OpenShift
runs-on: ubuntu-22.04
environment:
name: dev
steps:
- uses: actions/checkout@v4
- name: Remove OpenShift artifacts
run: |
oc login --token=${{ secrets.OC_TOKEN }} --server=${{ secrets.OC_SERVER }}
oc project ${{ secrets.OC_NAMESPACE }}
# Remove old build runs, build pods and deployment pods
oc delete all,pvc,secret -l app=${{ env.NAME }}-${{ github.event.number }}
# If merged into main, then handle any image promotions
image-promotions:
name: Image Promotions
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-22.04
steps:
- name: Promoting API
uses: shrink/actions-docker-registry-tag@v3
with:
registry: ghcr.io
repository: ${{ github.repository }}/api
target: ${{ github.event.number }}
tags: test
# Notify when PR merged and branch = main
merge-notification:
name: Merge Notification
runs-on: ubuntu-22.04
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
steps:
- name: Pre-merge update
uses: mshick/add-pr-comment@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
allow-repeats: false
message: |
Your Pull Request code is being promoted! Please follow the link below.
[Main Merge Workflow](https://github.com/${{ github.repository }}/actions/workflows/merge-main.yml)