Skip to content

Docker Cleanup

Docker Cleanup #1

Workflow file for this run

name: Docker Cleanup
on: delete
jobs:
cleanup_branch:
if: startsWith(github.event.ref_type, 'branch') == true
runs-on: ubuntu-latest
steps:
- name: docker tag
uses: frabert/replace-string-action@master
id: dockertag
with:
pattern: '[:\.\/]+'
string: "${{ github.event.ref }}"
replace-with: '-'
flags: 'g'
- name: remove docker tag
shell: bash
env:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tag: ${{ steps.dockertag.outputs.replaced }}
run: |
docker run --rm lumir/remove-dockerhub-tag --user "$username" --password "$password" saltydk/crs:$tag