add: remove old docker image
Some checks failed
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Successful in 10s
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 2s
Blog Deployment / Merge (push) Successful in 5s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Failing after 2s
Some checks failed
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Successful in 10s
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 2s
Blog Deployment / Merge (push) Successful in 5s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Failing after 2s
This commit is contained in:
parent
6a9aa3be2b
commit
9e532d5d4f
@ -18,6 +18,7 @@ jobs:
|
||||
latest_hugo_version: ${{ steps.get_latest.outputs.version }}
|
||||
current_hugo_version: ${{ steps.get_current.outputs.version }}
|
||||
newer_version_available: ${{ steps.compare.outputs.version }}
|
||||
current_docker_image: ${{ steps.current_docker.outputs.image }}
|
||||
docker_folder_changed: ${{ steps.docker_folder.outputs.changed }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
@ -48,6 +49,12 @@ jobs:
|
||||
fi
|
||||
echo "version=$new_version_available" | tee -a $GITEA_OUTPUT
|
||||
|
||||
- name: Get Current Docker Image ID
|
||||
id: current_docker
|
||||
run: |
|
||||
current_image=$(docker image ls ${DOCKER_IMAGE}:latest --format '{{.ID}}' | head -n1)
|
||||
echo "image=$current_image" | tee -a $GITEA_OUTPUT
|
||||
|
||||
- name: Check Changes in the Docker Folder
|
||||
id: docker_folder
|
||||
run: |
|
||||
@ -182,11 +189,16 @@ jobs:
|
||||
- Check-Rebuild
|
||||
- Build
|
||||
- Test-Production
|
||||
if: needs.Check-Rebuild.outputs.newer_version_available == 'true'
|
||||
runs-on: docker
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
run: docker image rm vezpi-blog:${{ needs.Check-Rebuild.outputs.current_hugo_version }} --force
|
||||
# - name: Remove Old Docker Image
|
||||
# if: needs.Check-Rebuild.outputs.newer_version_available == 'true'
|
||||
# run: |
|
||||
# docker image rm vezpi-blog:${{ needs.Check-Rebuild.outputs.current_hugo_version }} --force
|
||||
|
||||
- name: Remove Old Docker Image
|
||||
run: docker image rm {{ needs.Check-Rebuild.outputs.current_docker_image }} --force
|
||||
|
@ -14,6 +14,8 @@ if [ "$BRANCH" = "preview" ]; then
|
||||
DRAFTS="--buildDrafts"
|
||||
fi
|
||||
|
||||
#removeme
|
||||
|
||||
# Clone repo
|
||||
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
|
||||
git clone --depth 1 --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
||||
|
Loading…
x
Reference in New Issue
Block a user