CGU : Changement de l'adresse de contact du DPO #5990
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🔪 Review app removal | |
# Run this pipeline when a pull request having the label "review-app" is closed. | |
on: | |
pull_request: | |
types: [ unlabeled, closed ] | |
env: | |
CLEVER_TOOLS_DOWNLOAD_URL: https://clever-tools.clever-cloud.com/releases/latest/clever-tools-latest_linux.tar.gz | |
CLEVER_TAR_FILE: clever-tools-latest_linux.tar.gz | |
CLEVER_CLI: clever-tools-latest_linux/clever | |
CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }} | |
CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }} | |
BRANCH: ${{ github.head_ref }} | |
jobs: | |
delete: | |
runs-on: ubuntu-latest | |
if: github.event.label.name == '1-recette-jetable' || contains( github.event.pull_request.labels.*.name, '1-recette-jetable') | |
steps: | |
- name: 📥 Checkout to the PR branch | |
uses: actions/[email protected] | |
- name: 🏷 Set review app name | |
run: | |
echo "REVIEW_APP_NAME=`echo \"c1-review-$BRANCH\" | sed -r 's/[-;\\/._]+/-/g'`" >> $GITHUB_ENV | |
- name: 🏷 Set database addon name | |
run: | |
echo "REVIEW_APP_DB_NAME=`echo $REVIEW_APP_NAME | sed -r 's/-/_/g'`" >> $GITHUB_ENV | |
- name: 🤝 Find the application on Clever Cloud | |
run: | | |
curl $CLEVER_TOOLS_DOWNLOAD_URL > $CLEVER_TAR_FILE | |
tar -xvf $CLEVER_TAR_FILE | |
echo "Clever CLI version: $($CLEVER_CLI version)" | |
$CLEVER_CLI login --token $CLEVER_TOKEN --secret $CLEVER_SECRET | |
$CLEVER_CLI link $REVIEW_APP_NAME --org itou_review_apps | |
- name: 💂 Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: 🗑 Delete S3 bucket | |
run: | | |
pip install boto3 | |
scripts/delete-bucket | |
- name: 🗑 Delete the review app | |
run: | | |
$CLEVER_CLI delete --yes | |
- name: 🗑 Delete the review app database | |
run: | | |
$CLEVER_CLI addon delete $REVIEW_APP_DB_NAME --org itou_review_apps --yes |