0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Merge pull request #187 from tokens-studio/clean-ci

Cleanup
This commit is contained in:
SorsOps 2024-06-20 02:18:31 +02:00 committed by GitHub
commit 31344a5322
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 60 deletions

View file

@ -5,6 +5,7 @@ namespace: penpot
deploy:
event: pr
cleanup:
branch: "*"
event: branchDeleted
app: penpot-pr-{{ .BRANCH | sanitizeDNSName }}
chart:

View file

@ -1,15 +0,0 @@
name: Cleanup Images
on:
workflow_dispatch:
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/delete-package-versions@v5
with:
package-name: 'tokens-studio-for-penpot'
package-type: 'container'
min-versions-to-keep: 0
delete-only-untagged-versions: 'true'

View file

@ -1,45 +0,0 @@
name: Cleanup branches
on:
delete:
branches:
- "*"
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Determine the branch name
id: determine_branch
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "branch_name=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
fi
- name: Replace / with - in branch name
id: replace_slash
run: |
SANITIZED_BRANCH_NAME=$(echo "${{ env.branch_name }}" | tr '/' '-')
echo "sanitized_branch_name=${SANITIZED_BRANCH_NAME}" >> $GITHUB_ENV
- name: 🍍 Deploy with Gimlet
uses: gimlet-io/gimlet-artifact-shipper-action@v0.8.3
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
- name: Delete image
uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: tokens-studio
name: tokens-studio-for-penpot
token: ${{ secrets.PAT_TOKEN }}
tag: pr-frontend-${{ env.sanitized_branch_name }}
- name: Delete image
uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: tokens-studio
name: tokens-studio-for-penpot
token: ${{ secrets.PAT_TOKEN }}
tag: pr-backend-${{ env.sanitized_branch_name }}