Skip to content

dashboard wise deployment need to merge in dashboard_deployment #88

dashboard wise deployment need to merge in dashboard_deployment

dashboard wise deployment need to merge in dashboard_deployment #88

name: PR Teardown
on:
pull_request:
types:
- closed
jobs:
close_job:
# this job will only run if the PR has been closed without being merged
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- run: |
echo PR #${{ github.event.number }} has been closed without being merged, removing milestone.
gh pr edit ${{ github.event.number }} --milestone "" --repo $GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tear_down_deployment:
runs-on: self-hosted
environment: development
env:
AWS_DEFAULT_REGION: eu-central-1
PR_NUMBER: ${{ github.event.number }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- run: |
aws lightsail delete-container-service --service-name dev-grafana-${PR_NUMBER} || :