Skip to content

Commit 802652c

Browse files
committed
fix cache before attempting build
1 parent 643ebc6 commit 802652c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
APK_PACKAGER: ${{ secrets.APK_PACKAGER }}
88
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
99
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
10-
10+
APORTS_SCRIPTS: /home/sandbox/scripts
1111
on:
1212
push:
1313
branches:
@@ -95,16 +95,14 @@ jobs:
9595
echo -e "Alpine Linux: v${{ env.ALPINE_VERSION }}"
9696
echo -e "PHP Version: ${{ env.PHP_VERSION }}"
9797
echo -e "PHP Release: ${{ env.PHP_MINOR_VERSION }}"
98-
echo -e "Current repository files:"
99-
ls -lhart ${{ env.PA_BUILD_PATH }} || echo -e "target directory not found."
10098
10199
# build packages.
102100
- name: build
103101
run: |
104102
echo "" > .env
105103
echo -e "${{ secrets.PHP_ALPINE_RSA }}" > .abuild/php-alpine.rsa
106104
echo -e "${{ secrets.PHP_ALPINE_RSA_PUB }}" > .abuild/php-alpine.rsa.pub
107-
chmod -R 644 ${{ env.PA_BUILD_PATH }}/* || echo -e "error setting permissions"
105+
docker-compose run sandbox pa-fix-permissions.sh
108106
docker-compose run sandbox buildrepo -a /home/sandbox/scripts -p -k ${{ env.PHP_VERSION_SLUG }}
109107
110108
# upload artifacts.

bin/pa-fix-permissions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
# fix all packages permissions.
4+
sudo chown -R sandbox:sandbox "$HOME"/packages || echo -e ""
5+
# fix all packages ownership.
6+
sudo chmod -R 644 "$HOME"/packages/*/*/*.{apk,tar.gz} || echo -e ""
7+
# list cached packages.
8+
ls -lhart "$HOME"/packages/*/*/*.{apk,tar.gz} || echo -e ""

0 commit comments

Comments
 (0)