Skip to content

Commit f3b238d

Browse files
committed
fix install_common not running
1 parent 0a35a9f commit f3b238d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Install dependencies and build image
7777
run: |
7878
chmod +x mount.sh
79-
./mount.sh ${{ matrix.base_image }} ${{ matrix.script}} ./install_common.sh
79+
./mount.sh ${{ matrix.base_image }} ${{ matrix.script}} install_common.sh ${{ github.ref_name }} ${{ matrix.name }}
8080
8181
- name: Compress built image
8282
run: |

install_common.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Verbose and exit on errors
44
set -ex
55

6+
GITHUB_REF_NAME=$1
7+
MATRIX_NAME=$2
8+
69
# Do additional tasks that are common across all images,
710
# but not suitable for inclusion in install.sh
811
echo "Running install_common.sh"
@@ -26,10 +29,10 @@ echo "photon:vision" | chpasswd
2629

2730
# Add a helpful message to the logon screen
2831
# ASCII Art generated by: https://www.asciiart.eu/image-to-ascii
29-
cp -f ./files/issue.txt /etc/issue
32+
cp -f /tmp/build/files/issue.txt /etc/issue
3033
cp -f /etc/issue /etc/issue.net
3134
sed -i 's/#Banner none/Banner \/etc\/issue.net/g' /etc/ssh/sshd_config
3235

3336
# Add photon version file
3437
mkdir -p /opt/photonvision/
35-
echo "${{ github.ref_name }};${{ matrix.name }}" > /opt/photonvision/image-version
38+
echo "${GITHUB_REF_NAME};${MATRIX_NAME}" > /opt/photonvision/image-version

mount.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ sudo chroot rootfs /bin/bash -c "
226226
echo '=== Running ${scriptOne} ==='
227227
./tmp/build/${scriptOne}
228228
229-
if [ -f "${scriptTwo}" ]; then
229+
if [ -f "/tmp/build/${scriptTwo}" ]; then
230230
echo '=== Making second script executable ==='
231231
chmod +x /tmp/build/${scriptTwo}
232232
echo '=== Running ${scriptTwo} ==='
233-
./tmp/build/${scriptTwo}
233+
./tmp/build/${scriptTwo} $(printf '%q ' "${@:4}")
234234
else
235235
echo 'No second script provided, skipping.'
236236
fi

0 commit comments

Comments
 (0)