Unverified Commit 0876b92f authored by Diego Hernandes's avatar Diego Hernandes Committed by GitHub
Browse files

Merge pull request #127 from codecasts/master

fix caching
parents b0cbb44d 0c9932bf
......@@ -55,7 +55,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.PA_BUILD_PATH }}
key: ${{ env.PA_BUILD_SLUG }}
key: ${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
restore-keys: |
${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
${{ env.PA_BUILD_SLUG }}-
${{ env.PA_BUILD_SLUG }}
# debug info.
- name: debug-info
......
......@@ -61,7 +61,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.PA_BUILD_PATH }}
key: ${{ env.PA_BUILD_SLUG }}
key: ${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
restore-keys: |
${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
${{ env.PA_BUILD_SLUG }}-
${{ env.PA_BUILD_SLUG }}
# debug info.
- name: debug-info
......
......@@ -55,7 +55,11 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.PA_BUILD_PATH }}
key: ${{ env.PA_BUILD_SLUG }}
key: ${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
restore-keys: |
${{ env.PA_BUILD_SLUG }}-${{ hashFiles('scripts/**/APKBUILD') }}
${{ env.PA_BUILD_SLUG }}-
${{ env.PA_BUILD_SLUG }}
# debug info.
- name: debug-info
......
......@@ -80,4 +80,4 @@ ENTRYPOINT ["/opt/php-alpine/entrypoint.sh"]
WORKDIR "/home/sandbox/scripts"
# use bash as default command.
CMD ["/bin/sh"]
CMD ["/bin/ash"]
#!/bin/sh
# source /etc/profile
. /etc/profile
#!/usr/bin/env ash
# trust the locally mounted public key and fix permissions.
sudo cp /home/sandbox/.abuild/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
sudo chmod u=rw,go=r /etc/apk/keys/php-alpine.rsa.pub
# fix home dir owner permissions.
sudo chown -R sandbox:sandbox /home/sandbox
# fix all packages permissions.
sudo chown -R sandbox:sandbox "$HOME"/packages || echo -e ""
# fix all packages ownership.
sudo chmod -R 644 "$HOME"/packages/*/*/*.apk || echo -e ""
sudo chmod -R 644 "$HOME"/packages/*/*/*.tar.gz || echo -e ""
# determine cpu count.
# ABUILD_JOBS=$(grep -c '^processor\s*:\s[0-9]*$' < /proc/cpuinfo)
ABUILD_JOBS=$(grep -c '^processor\s*:\s[0-9]*$' < /proc/cpuinfo)
# configure JOBS variable as cpu count on abuild.conf file.
# sudo sed -i "/export JOBS=.*/c\export JOBS=$ABUILD_JOBS" /etc/abuild.conf
sudo sed -i "/export JOBS=.*/c\export JOBS=$ABUILD_JOBS" /etc/abuild.conf
# source env files generated during docker build.
if [ -f ~/.build_env ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment