Skip to content

Commit

Permalink
fix cache before attempting build
Browse files Browse the repository at this point in the history
  • Loading branch information
hernandev committed Dec 31, 2020
1 parent 643ebc6 commit 802652c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
APK_PACKAGER: ${{ secrets.APK_PACKAGER }}
BINTRAY_USERNAME: ${{ secrets.BINTRAY_USERNAME }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}

APORTS_SCRIPTS: /home/sandbox/scripts
on:
push:
branches:
Expand Down Expand Up @@ -95,16 +95,14 @@ jobs:
echo -e "Alpine Linux: v${{ env.ALPINE_VERSION }}"
echo -e "PHP Version: ${{ env.PHP_VERSION }}"
echo -e "PHP Release: ${{ env.PHP_MINOR_VERSION }}"
echo -e "Current repository files:"
ls -lhart ${{ env.PA_BUILD_PATH }} || echo -e "target directory not found."
# build packages.
- name: build
run: |
echo "" > .env
echo -e "${{ secrets.PHP_ALPINE_RSA }}" > .abuild/php-alpine.rsa
echo -e "${{ secrets.PHP_ALPINE_RSA_PUB }}" > .abuild/php-alpine.rsa.pub
chmod -R 644 ${{ env.PA_BUILD_PATH }}/* || echo -e "error setting permissions"
docker-compose run sandbox pa-fix-permissions.sh
docker-compose run sandbox buildrepo -a /home/sandbox/scripts -p -k ${{ env.PHP_VERSION_SLUG }}
# upload artifacts.
Expand Down
8 changes: 8 additions & 0 deletions bin/pa-fix-permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# fix all packages permissions.
sudo chown -R sandbox:sandbox "$HOME"/packages || echo -e ""
# fix all packages ownership.
sudo chmod -R 644 "$HOME"/packages/*/*/*.{apk,tar.gz} || echo -e ""
# list cached packages.
ls -lhart "$HOME"/packages/*/*/*.{apk,tar.gz} || echo -e ""

0 comments on commit 802652c

Please sign in to comment.