Skip to content

Commit

Permalink
Merge branch 'development' of github.com:PandaTechAM/be-tmp-panda-web…
Browse files Browse the repository at this point in the history
…-api into development
  • Loading branch information
Haik committed Jan 10, 2024
2 parents 49409c3 + 31147bc commit 8913238
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,11 @@ jobs:
- name: Cleanup
run: rm -rf ./publish

- name: Remove the built image from the GitHub runners keeping last one
run: |
# Get the ID of the latest Docker image
LATEST_IMAGE=$(docker images --format '{{.ID}}' --filter=reference=${{ env.DOCKER_REPO_BASE }}/${{ env.DOCKER_REPO_PATH }}/${{ github.event.repository.name }} | head -n 1)
# Remove all Docker images except the latest one
docker rmi -f $(docker images --format '{{.ID}}' --filter=reference=${{ env.DOCKER_REPO_BASE }}/${{ env.DOCKER_REPO_PATH }}/${{ github.event.repository.name }} | grep -v ${LATEST_IMAGE}) || true

0 comments on commit 8913238

Please sign in to comment.