Skip to content

Commit

Permalink
feat: delete old docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang1221 authored Nov 27, 2024
1 parent e24a77c commit 66a13b7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ jobs:
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7}
sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} ddanzi
sudo docker-compose up -d --remove-orphans
echo "Removing old Docker images..."
sudo docker image prune -af --filter "until=24h"
# Deploy_production
deploy_production:
runs-on: ubuntu-latest
Expand All @@ -84,4 +87,7 @@ jobs:
sudo docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7}
sudo docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:${GITHUB_SHA::7} ddanzi
sudo docker-compose up -d --remove-orphans
sudo docker-compose up -d --remove-orphans
echo "Removing old Docker images..."
sudo docker image prune -af --filter "until=24h"

0 comments on commit 66a13b7

Please sign in to comment.