Skip to content

Commit 8a1aaef

Browse files
committed
Workaround for actions/runner#716
Fixes #96
1 parent 543dbd3 commit 8a1aaef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,21 @@ runs:
123123
esac
124124
arm_cpu=${cpu%:*}
125125
aarch64_cpu=${cpu#*:}
126-
sudo gcc -static ${{ github.action_path }}/qemu-wrapper.c -DQEMU_CPU=${arm_cpu} -O3 -s -o /usr/bin/qemu-arm-static0
127-
sudo gcc -static ${{ github.action_path }}/qemu-wrapper.c -DQEMU_CPU=${aarch64_cpu} -O3 -s -o /usr/bin/qemu-aarch64-static0
126+
sudo gcc -static ${GITHUB_ACTION_PATH}/qemu-wrapper.c -DQEMU_CPU=${arm_cpu} -O3 -s -o /usr/bin/qemu-arm-static0
127+
sudo gcc -static ${GITHUB_ACTION_PATH}/qemu-wrapper.c -DQEMU_CPU=${aarch64_cpu} -O3 -s -o /usr/bin/qemu-aarch64-static0
128128
sudo update-binfmts --unimport qemu-arm
129129
sudo update-binfmts --unimport qemu-aarch64
130130
sudo update-binfmts --package arm-runner-action --install arm-runner-action-qemu-arm /usr/bin/qemu-arm-static0 --magic '\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' --credentials yes --fix-binary yes
131131
sudo update-binfmts --package arm-runner-action --install arm-runner-action-qemu-aarch64 /usr/bin/qemu-aarch64-static0 --magic '\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' --credentials yes --fix-binary yes
132132
133133
- name: Download base image
134134
run: |
135-
bash ${{ github.action_path }}/download_image.sh ${{ inputs.base_image }}
135+
bash ${GITHUB_ACTION_PATH}/download_image.sh ${{ inputs.base_image }}
136136
shell: bash
137137
id: download_image
138138
- name: Mount and optionally resize image
139139
run: |
140-
sudo --preserve-env=GITHUB_OUTPUT bash ${{ github.action_path }}/mount_image.sh ${{ steps.download_image.outputs.image }} ${{ inputs.image_additional_mb }} ${{ inputs.use_systemd_nspawn }} ${{ inputs.rootpartition }} ${{ inputs.bootpartition }}
140+
sudo --preserve-env=GITHUB_OUTPUT bash ${GITHUB_ACTION_PATH}/mount_image.sh ${{ steps.download_image.outputs.image }} ${{ inputs.image_additional_mb }} ${{ inputs.use_systemd_nspawn }} ${{ inputs.rootpartition }} ${{ inputs.bootpartition }}
141141
shell: bash
142142
id: mount_image
143143
- name: Mount CPU info
@@ -146,7 +146,7 @@ runs:
146146
if [ -e ${{ github.workspace }}/${{ inputs.cpu_info }} ]; then
147147
cpu_info_path=${{ github.workspace }}/${{ inputs.cpu_info }}
148148
else
149-
cpu_info_path=${{ github.action_path }}/${{ inputs.cpu_info }}
149+
cpu_info_path=${GITHUB_ACTION_PATH}/${{ inputs.cpu_info }}
150150
fi
151151
sudo mount --bind ${cpu_info_path} ${{ steps.mount_image.outputs.mount }}/proc/cpuinfo
152152
shell: bash
@@ -292,7 +292,7 @@ runs:
292292
sudo umount ${{ steps.mount_image.outputs.mount }}${repository_path}
293293
;;
294294
esac
295-
sudo bash ${{ github.action_path }}/cleanup_image.sh ${{ steps.mount_image.outputs.loopdev }} ${{ steps.mount_image.outputs.mount }} ${{ steps.download_image.outputs.image }} "${{ inputs.optimize_image }}" "${{ inputs.rootpartition }}"
295+
sudo bash ${GITHUB_ACTION_PATH}/cleanup_image.sh ${{ steps.mount_image.outputs.loopdev }} ${{ steps.mount_image.outputs.mount }} ${{ steps.download_image.outputs.image }} "${{ inputs.optimize_image }}" "${{ inputs.rootpartition }}"
296296
shell: bash
297297
- name: Restore qemu wrapper
298298
if: always()

0 commit comments

Comments
 (0)