2023-10-05 00:59:08 +00:00
|
|
|
name: Undeploy PR
|
|
|
|
run-name: ${{ gitea.actor }} is undeploying a PR
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [ closed ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Deploy PR:
|
2023-10-05 01:22:54 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-10-05 00:59:08 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v4
|
2023-10-05 01:14:17 +00:00
|
|
|
with:
|
|
|
|
python-version: '3.12.0'
|
2023-10-05 00:59:08 +00:00
|
|
|
- name: Install pip packages
|
2023-10-05 01:02:32 +00:00
|
|
|
run: pip install requests python-dotenv --quiet
|
2023-10-05 00:59:08 +00:00
|
|
|
- name: Run Undeploy script
|
|
|
|
run: >
|
2023-10-05 01:02:32 +00:00
|
|
|
python deploy/portainer/undeploy.py
|
2023-10-05 00:59:08 +00:00
|
|
|
--PORTAINER https://dvportainer.privatedns.org
|
|
|
|
--PORTAINER_API_KEY=ptr_RwxH2Cd+htdD2FoFiG46erT9beyvj9VoF3BrQPtDH3Q=
|
|
|
|
--PORTAINER_EP=CICD-runner
|
|
|
|
--GITEA_API_KEY=f449c74ec7f04e54fe1e481eae43492b34cea406
|
|
|
|
--DEPLOY_REPO_URL=${DRONE_REPO_LINK}
|
|
|
|
--DEPLOY_BRANCH=${DRONE_SOURCE_BRANCH}
|
2023-10-04 20:29:08 +00:00
|
|
|
|