Skip to content

Commit

Permalink
Merge pull request #23 from mehedikhan72/playing-with-ci-cd
Browse files Browse the repository at this point in the history
garbage collection automated
  • Loading branch information
mehedikhan72 authored Aug 25, 2024
2 parents 0a9e4bd + 211ae75 commit 57c34be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: Remove all old images
run: if [ ! -z "$(doctl registry repository list | grep "$(echo $IMAGE_NAME)")" ]; then doctl registry repository delete-manifest $(echo $IMAGE_NAME) $(doctl registry repository list-tags $(echo $IMAGE_NAME) | grep -o "sha.*") --force; else echo "No repository"; fi

- name: Remove Garbage
run: doctl registry garbage-collection start [--include-untagged-manifests] [pathphindr]

- name: Push image to DigitalOcean Container Registry
run: docker push $(echo $REGISTRY)/$(echo $IMAGE_NAME):$(echo $GITHUB_SHA | head -c7)

Expand Down

0 comments on commit 57c34be

Please sign in to comment.