42 lines
1 KiB
YAML
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
|
|
|