echo "Rebuild required: ${rebuild}"
echo "rebuild=${rebuild}" >> "$GITHUB_ENV"
- uses: actions/setup-python@v1
+ - name: make cache dir for pbuilder
+ ## prevent permission error
+ run: sudo mkdir --mode a=rwx --parents /var/cache/pbuilder
- name: make cache key
if: env.rebuild == '1'
id: make-key
if: env.rebuild == '1'
uses: actions/cache@v3
with:
- path: /var/cache/pbuilder
+ path: |
+ /var/cache/pbuilder/aptcache
+ /var/cache/pbuilder/base.tgz
key: ${{ steps.make-key.outputs.cache_key }}
- name: prepare pdebuild
if: env.rebuild == '1'
cat ~/.pbuilderrc
sudo mkdir -p /root/
sudo ln -s ~/.pbuilderrc /root/
+ - name: make pbuilder base.tgz
+ if: steps.cache-pbuilder.outputs.cache-hit != 'true'
+ run: |
echo "=== pbuilder create"
echo "::group::pbuilder create --allow-untrusted"
sudo pbuilder create --allow-untrusted