Skip to content

Commit

Permalink
fix backup step in cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Dec 23, 2024
1 parent 5cdc03f commit 5e4ba6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Backup docker files
run: |
echo "backup moby/buildkit image"
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ jobs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:
- name: Backup docker files
run: |
echo "backup moby/buildkit image"
sudo docker image save -o ${GITHUB_WORKSPACE}/images.tar moby/buildkit
echo "Back up /var/lib/docker folder structure and other files"
sudo rsync -aPq /var/lib/docker/ ${GITHUB_WORKSPACE}/docker
# Free GitHub Actions Environment Disk Space
- name: Maximize build space
uses: easimon/maximize-build-space@master
Expand All @@ -31,14 +25,6 @@ jobs:
remove-codeql: 'true'
build-mount-path: '/var/lib/docker/'

- name: Restore docker files
run: |
sudo rsync -aPq ${GITHUB_WORKSPACE}/docker/ /var/lib/docker
sudo rm -rf ${GITHUB_WORKSPACE}/docker
sudo ls ${GITHUB_WORKSPACE} -l
sudo docker image load -i ${GITHUB_WORKSPACE}/images.tar
sudo rm ${GITHUB_WORKSPACE}/images.tar
- name: Checkout
uses: actions/checkout@v4

Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ jobs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:
- name: Backup docker files
run: |
echo "backup moby/buildkit image"
sudo docker image save -o ${GITHUB_WORKSPACE}/images.tar moby/buildkit
echo "Back up /var/lib/docker folder structure and other files"
sudo rsync -aPq /var/lib/docker/ ${GITHUB_WORKSPACE}/docker
# Free GitHub Actions Environment Disk Space
- name: Maximize build space
uses: easimon/maximize-build-space@master
Expand All @@ -32,14 +26,6 @@ jobs:
remove-codeql: 'true'
build-mount-path: '/var/lib/docker/'

- name: Restore docker files
run: |
sudo rsync -aPq ${GITHUB_WORKSPACE}/docker/ /var/lib/docker
sudo rm -rf ${GITHUB_WORKSPACE}/docker
sudo ls ${GITHUB_WORKSPACE} -l
sudo docker image load -i ${GITHUB_WORKSPACE}/images.tar
sudo rm ${GITHUB_WORKSPACE}/images.tar
- name: Checkout
uses: actions/checkout@v4

Expand Down

0 comments on commit 5e4ba6c

Please sign in to comment.