mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
build-lxd.yml: Prevent code injection in GH workflow via malicious PR
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
66c1601e5a
commit
298404437d
8
.github/workflows/build-lxd.yml
vendored
8
.github/workflows/build-lxd.yml
vendored
@ -276,13 +276,15 @@ jobs:
|
||||
# exit 1
|
||||
# }
|
||||
# - name: Update ncp
|
||||
# env:
|
||||
# HEAD_REF: "${{ github.head_ref }}"
|
||||
# run: |
|
||||
# set -ex
|
||||
# BRANCH="${VERSION/refs\/heads\//}"
|
||||
# BRANCH="${BRANCH/refs\/tags\//}"
|
||||
# if [[ "$BRANCH" =~ "refs/pull/"* ]]
|
||||
# then
|
||||
# UPDATE_ARGS=("${{ github.head_ref }}" "$VERSION")
|
||||
# UPDATE_ARGS=("${HEAD_REF}" "$VERSION")
|
||||
# else
|
||||
# UPDATE_ARGS=("$BRANCH")
|
||||
# fi
|
||||
@ -439,13 +441,15 @@ jobs:
|
||||
}
|
||||
|
||||
- name: Update ncp
|
||||
env:
|
||||
HEAD_REF: "${{ github.head_ref }}"
|
||||
run: |
|
||||
set -ex
|
||||
BRANCH="${VERSION/refs\/heads\//}"
|
||||
BRANCH="${BRANCH/refs\/tags\//}"
|
||||
if [[ "$BRANCH" =~ "refs/pull/"* ]]
|
||||
then
|
||||
UPDATE_ARGS=("${{ github.head_ref }}" "$VERSION")
|
||||
UPDATE_ARGS=("${HEAD_REF}" "$VERSION")
|
||||
else
|
||||
UPDATE_ARGS=("$BRANCH")
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user