Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Bump docker/build-push-action from 3.1.0 to 4.0.0 #1

Bump docker/build-push-action from 3.1.0 to 4.0.0

Bump docker/build-push-action from 3.1.0 to 4.0.0 #1

# Cleans up DockerHub image tag created for the PR
name: DockerHub Clean-up
# Controls when the action will run.
on:
# Triggers the workflow on closed events for the main branch
pull_request:
# 'closed' covers merges too
types: [closed]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Remove the extra container tag from DockerHub
clear_extra_container:
name: "Remove extra DockerHub container"
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# We need `jq` for the script, so we run in a container with it installed
container:
image: dwdraju/alpine-curl-jq
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out the repo under $GITHUB_WORKSPACE so we can access the delete script
- name: Checkout Code
uses: actions/checkout@v3
# Run our script which calls the dockerhub API to delete the PR's tag
- name: Delete DockerHub image tag
run: |
DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} \
DOCKERHUB_PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} \
TAG=pull-request-${{ github.event.number }} \
.github/workflows/scripts/remove_dockerhub_tag.sh