Skip to content

Commit

Permalink
ci: Docker prune DOC-957 (#1893)
Browse files Browse the repository at this point in the history
* ci: container prunning

* ci: container prunning

* ci: DOC-957
  • Loading branch information
karl-cardenas-coding committed Dec 13, 2023
1 parent a978f01 commit 17fce6d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/container-prune.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Container Image Cleanup

on:
workflow_run:
workflows: ["Nighly Docker Build"]
types: [completed]
workflow_dispatch:


jobs:
prune:
name: Prune Container Images
runs-on: ubuntu-latest
steps:
- uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: spectrocloud
name: librarium
token: ${{ secrets.GITHUB_TOKEN }}
untagged-keep-latest: 2

- name: Slack Notification
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "spectromate"
SLACK_ICON_EMOJI: ":robot_panic:"
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'The nightly docs container prune workflow failed. Review the GitHub Actions logs for more details.'

0 comments on commit 17fce6d

Please sign in to comment.