File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,28 @@ runs:
101101 sudo -u postgres psql -c "ALTER USER $SCANCODEIO_DB_USER WITH ENCRYPTED PASSWORD '$SCANCODEIO_DB_PASSWORD'"
102102 sudo -u postgres createdb --owner=scancodeio --encoding=UTF-8 "$SCANCODEIO_DB_NAME"
103103
104- - name : Install scanpipe wrapper script
104+ - name : Write scanpipe wrapper script
105105 shell : bash
106106 run : |
107- cp "${{ github.action_path }}/scripts/scanpipe.sh" "$RUNNER_TEMP/scanpipe"
107+ cat > "$RUNNER_TEMP/scanpipe" << 'EOF'
108+ # !/usr/bin/env bash
109+ set -euo pipefail
110+ exec docker run --rm \
111+ --network host \
112+ --user "$(id -u):$(id -g)" \
113+ --cap-drop ALL \
114+ --security-opt no-new-privileges \
115+ -e SECRET_KEY \
116+ -e SCANCODEIO_DB_NAME \
117+ -e SCANCODEIO_DB_USER \
118+ -e SCANCODEIO_DB_PASSWORD \
119+ -e SCANCODEIO_DB_HOST=localhost \
120+ -e SCANCODEIO_WORKSPACE_LOCATION \
121+ -e HOME=/workspace/.home \
122+ -v "$GITHUB_WORKSPACE:/workspace" \
123+ " $SCANCODEIO_IMAGE" \
124+ scanpipe "$@"
125+ EOF
108126 chmod +x "$RUNNER_TEMP/scanpipe"
109127 echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
110128
You can’t perform that action at this time.
0 commit comments