superlint/.github/workflows/cleanup-DEV.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

2019-11-08 09:31:16 -05:00
---
2020-01-09 14:04:41 -05:00
##########################
##########################
## Cleanup Docker Image ##
##########################
##########################
2019-11-08 09:31:16 -05:00
#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#
2020-01-09 14:04:41 -05:00
########################################
# Run job when PR is merged and closed #
########################################
2019-11-08 09:39:18 -05:00
on:
2020-01-09 14:04:41 -05:00
pull_request:
2020-01-09 14:12:36 -05:00
types: [closed]
2019-11-08 09:31:16 -05:00
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
2020-01-09 14:04:41 -05:00
name: Cleanup Docker Image - DEV
2019-11-08 09:31:16 -05:00
# Set the agent to run on
runs-on: ubuntu-latest
##################
# Load all steps #
##################
steps:
2019-11-08 09:45:57 -05:00
##########################
# Checkout the code base #
##########################
- name: Checkout Code
2020-01-09 14:47:36 -05:00
- uses: actions/checkout@v2
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
2019-11-08 09:45:57 -05:00
2020-01-09 14:04:41 -05:00
######################
# Run Removal script #
######################
- name: Remove old image from DockerHub
2019-11-08 09:42:17 -05:00
env:
# Set the Env Vars
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_REPO: admiralawkbar/super-linter
2019-11-08 09:31:16 -05:00
shell: bash
2020-01-09 14:04:41 -05:00
run: .automation/cleanup-docker.sh