File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070
7171 build_and_push :
7272 needs : [check_changes]
73- if : ${{ github.repository_owner == 'CubeCoders' && github.ref == 'refs/heads/master' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }}
73+ if : ${{ github.repository_owner == 'CubeCoders' && github.ref == 'refs/heads/master' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') && needs.check_changes.outputs.apps_json != '[]' }}
7474 name : ' amp:apps-${{ matrix.app }}'
7575 runs-on : ubuntu-latest
7676 strategy :
Original file line number Diff line number Diff line change @@ -20,19 +20,17 @@ ln -s /etc/machine-id /var/lib/dbus/machine-id
2020
2121echo " [Info] Setting up amp user and group..."
2222
23- if ! getent group " ${AMPGROUPID} " > /dev/null; then
24- if getent group amp > /dev/null; then
25- groupmod -o -g " ${AMPGROUPID} " amp
26- else
27- groupadd -r -g " ${AMPGROUPID} " amp
28- fi
23+ if getent group amp > /dev/null; then
24+ groupmod -o -g " ${AMPGROUPID} " amp
25+ else
26+ groupadd -r -o -g " ${AMPGROUPID} " amp
2927fi
3028
3129if id amp & > /dev/null; then
3230 usermod -o -u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
3331else
3432 useradd -m -d /home/amp -s /bin/bash -c " AMP Process User" \
35- -u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
33+ -o - u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
3634fi
3735
3836getent group tty > /dev/null && usermod -aG tty amp
@@ -72,7 +70,7 @@ if [[ -n "${AMP_MOUNTPOINTS:-}" ]]; then
7270 for dir in " ${dirs[@]} " ; do
7371 [[ -n " ${dir} " ]] || continue
7472 if [[ -e " ${dir} " ]]; then
75- chown -R amp:" ${AMPGROUPID} " " ${dir} " 2> /dev/null || echo " [Warn] chown failed for ${dir} ; continuing"
73+ chown -R amp:amp " ${dir} " 2> /dev/null || echo " [Warn] chown failed for ${dir} ; continuing"
7674 else
7775 echo " [Warn] Mountpoint not found: ${dir} ; skipping"
7876 fi
Original file line number Diff line number Diff line change @@ -20,19 +20,17 @@ ln -s /etc/machine-id /var/lib/dbus/machine-id
2020
2121echo " [Info] Setting up amp user and group..."
2222
23- if ! getent group " ${AMPGROUPID} " > /dev/null; then
24- if getent group amp > /dev/null; then
25- groupmod -o -g " ${AMPGROUPID} " amp
26- else
27- groupadd -r -g " ${AMPGROUPID} " amp
28- fi
23+ if getent group amp > /dev/null; then
24+ groupmod -o -g " ${AMPGROUPID} " amp
25+ else
26+ groupadd -r -o -g " ${AMPGROUPID} " amp
2927fi
3028
3129if id amp & > /dev/null; then
3230 usermod -o -u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
3331else
3432 useradd -m -d /home/amp -s /bin/bash -c " AMP Process User" \
35- -u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
33+ -o - u " ${AMPUSERID} " -g " ${AMPGROUPID} " amp
3634fi
3735
3836getent group tty > /dev/null && usermod -aG tty amp
@@ -72,7 +70,7 @@ if [[ -n "${AMP_MOUNTPOINTS:-}" ]]; then
7270 for dir in " ${dirs[@]} " ; do
7371 [[ -n " ${dir} " ]] || continue
7472 if [[ -e " ${dir} " ]]; then
75- chown -R amp:" ${AMPGROUPID} " " ${dir} " 2> /dev/null || echo " [Warn] chown failed for ${dir} ; continuing"
73+ chown -R amp:amp " ${dir} " 2> /dev/null || echo " [Warn] chown failed for ${dir} ; continuing"
7674 else
7775 echo " [Warn] Mountpoint not found: ${dir} ; skipping"
7876 fi
You can’t perform that action at this time.
0 commit comments