docker-cleanup/.forgejo/workflows/pull-and-rm.yml
xlionjuan 04c64089ca
All checks were successful
Clean / hel-1-hetzner-host (push) Successful in 1s
Clean / fsn-1-hetzner-host (push) Successful in 1s
Ensure host binding
2026-05-31 09:29:04 +00:00

42 lines
1 KiB
YAML

name: Clean
on:
workflow_dispatch:
inputs:
pull:
description: "Image to pull, 'n' to do nothing"
required: false
default: "node:lts"
type: string
rm:
description: "Image to remove, better to use ID, 'n' to do nothing"
required: false
default: "n"
type: string
jobs:
clean:
strategy:
matrix:
job:
- fsn-1-hetzner-host
- hel-1-hetzner-host
runs-on: ${{ matrix.job }}
name: ${{ matrix.job }}
steps:
- name: docker image ls -a --format json | jq
run: docker image ls -a --format json | jq
- name: Pull image
if: ${{ github.event.inputs.pull != 'n' }}
run: |
docker pull ${{ github.event.inputs.pull }}
- name: Remove image
if: ${{ github.event.inputs.rm != 'n' }}
run: |
docker rmi ${{ github.event.inputs.rm }}
- name: docker image ls -a --format json | jq
run: docker image ls -a --format json | jq