Skip to content

Commit

Permalink
feat(workflow): sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryVasanth committed Jun 22, 2023
1 parent 1c5d7d6 commit ed3ce66
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ga-image-sanitize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 🧼 Sanitize – Generated Docker Images

on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
keep-last:
description: >
Delete all untagged images except the last N
required: false
default: "1"

jobs:
delete-pr-tagged-image:
name: 🗑️ Delete PR${{github.event.pull_request.number}} Image
runs-on: ubuntu-latest
steps:
- name: 🗑️ Delete image PR${{github.event.pull_request.number}}
uses: bots-house/[email protected]
with:
owner: 01-edu
name: test-blockchain
token: ${{ secrets.GITHUB_TOKEN }}
tag: PR${{github.event.pull_request.number}}
continue-on-error: true

delete-untagged-images:
name: 🔥 Clear Untagged Images
needs: delete-pr-tagged-image
runs-on: ubuntu-latest
steps:
- name: 🔥 Clear all untagged images
uses: bots-house/[email protected]
with:
owner: 01-edu
name: test-blockchain
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: ${{ github.event.inputs.keep-last }}
continue-on-error: true

0 comments on commit ed3ce66

Please sign in to comment.