Skip to content

Psc vagrant

Psc vagrant #100

Workflow file for this run

name: PRCleanup
on:
pull_request:
types: [closed]
paths-ignore:
- 'slides/**'
jobs:
deployment:
runs-on: 'ubuntu-latest'
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
-
name: 'Install Helm'
uses: azure/setup-helm@v3
with:
version: v3.6.2
-
name: Install Kubectl
uses: azure/setup-kubectl@v3
with:
version: v1.21.2
-
name: Remove PR Environment Helm Release
env:
TRAINING_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}'
TRAINING_NAMESPACE: 'pitc-ansible-training-stg'
TRAINING_VERSION: '${{ github.sha }}'
KUBE_TOKEN: '${{ secrets.OPENSHIFT_SA_TOKEN_STG }}'
KUBE_URL: '${{ secrets.OPENSHIFT_API_URL }}'
run: |
helm uninstall $TRAINING_HELM_RELEASE --kube-apiserver=$KUBE_URL --kube-token=$KUBE_TOKEN --namespace=$TRAINING_NAMESPACE
- name: Delete Tags on Quay
id: delete_tags
env:
PR_NUMBER: '${{ github.event.pull_request.number }}'
QUAYIO_API_TOKEN: '${{ secrets.QUAYIO_API_TOKEN }}'
run: |
curl -X DELETE -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" https://quay.io/api/v1/repository/puzzle/ansible-training/tag/pr-${PR_NUMBER}