Skip to content

Instantly share code, notes, and snippets.

@diyor28
Created May 30, 2021 21:28
Show Gist options
  • Save diyor28/17fbbb9bebfbc8f4346d7b51dec12b05 to your computer and use it in GitHub Desktop.
Save diyor28/17fbbb9bebfbc8f4346d7b51dec12b05 to your computer and use it in GitHub Desktop.
name: Cleanup on branch removal
on: [ delete ]
jobs:
build:
runs-on: [ self-hosted, staging ]
steps:
- uses: actions/checkout@v2
- name: Cleanup
run: COMPOSE_PROJECT_NAME=${{ github.event.ref }} docker-compose down --volumes --remove-orphans --rmi all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment