mirror of
https://github.com/ps5-linux/ps5-linux-image.git
synced 2026-07-15 21:42:27 +00:00
Harden self-hosted image builds
This commit is contained in:
13
.github/workflows/build-image.yml
vendored
13
.github/workflows/build-image.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
INPUT="${{ inputs.distro || 'ubuntu2604' }}"
|
INPUT="${{ inputs.distro || 'ubuntu2604' }}"
|
||||||
if [ "$INPUT" = "all" ]; then
|
if [ "$INPUT" = "all" ]; then
|
||||||
echo 'distros=["ubuntu2604","arch","cachyos","kali"]' >> "$GITHUB_OUTPUT"
|
echo 'distros=["kali","ubuntu2604","arch","cachyos"]' >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "distros=[\"$INPUT\"]" >> "$GITHUB_OUTPUT"
|
echo "distros=[\"$INPUT\"]" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
@@ -59,9 +59,18 @@ jobs:
|
|||||||
distro: ${{ fromJson(needs.matrix.outputs.distros) }}
|
distro: ${{ fromJson(needs.matrix.outputs.distros) }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CACHE_DIR: /home/opc/ccache
|
CCACHE_DIR: /home/opc/ccache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Clean image workspace
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ -z "${GITHUB_WORKSPACE:-}" ] || [ "$GITHUB_WORKSPACE" = "/" ]; then
|
||||||
|
echo "Invalid GITHUB_WORKSPACE" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo rm -rf "$GITHUB_WORKSPACE/image"
|
||||||
|
|
||||||
- name: Checkout image builder
|
- name: Checkout image builder
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user