Skip to content

Commit

Permalink
enhance(ci): generate, export, store tar archive (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
truboxl authored Jan 17, 2024
1 parent 6189bbd commit e3c861f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build and push Docker image

on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 2 * * 0'
Expand Down Expand Up @@ -60,3 +62,23 @@ jobs:
docker tag termux/termux-docker:i686 termux/termux-docker:latest
docker push termux/termux-docker:latest
fi
- name: Export container as tar archive
if: always()
run: |
docker run \
--privileged \
--name termux-docker-${{ matrix.CPU_ARCH }} \
termux/termux-docker:${{ matrix.CPU_ARCH }} \
uname -a
docker stop termux-docker-${{ matrix.CPU_ARCH }}
docker export -o termux-docker-${{ matrix.CPU_ARCH }}.tar \
termux-docker-${{ matrix.CPU_ARCH }}
sha256sum termux-docker-${{ matrix.CPU_ARCH }}.tar
- name: Store tar archive
if: always()
uses: actions/upload-artifact@v4
with:
name: termux-docker-${{ matrix.CPU_ARCH }}-${{ github.sha }}
path: termux-docker-${{ matrix.CPU_ARCH }}.tar

0 comments on commit e3c861f

Please sign in to comment.