Do not interpolate GitHub Actions expressions in shell scripts
This commit is contained in:
parent
e0408a38b0
commit
2308f4f1ce
|
|
@ -29,11 +29,19 @@ jobs:
|
|||
|
||||
- name: Use local branch
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
|
||||
git branch -D $BRANCH 2>/dev/null || true
|
||||
git branch $BRANCH HEAD
|
||||
git checkout $BRANCH
|
||||
if [ "$EVENT_NAME" = "pull_request" ]; then
|
||||
BRANCH="$HEAD_REF"
|
||||
else
|
||||
BRANCH="$REF_NAME"
|
||||
fi
|
||||
git branch -D "$BRANCH" 2>/dev/null || true
|
||||
git branch "$BRANCH" HEAD
|
||||
git checkout "$BRANCH"
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
|
@ -60,11 +68,19 @@ jobs:
|
|||
|
||||
- name: Use local branch
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
|
||||
git branch -D $BRANCH 2>/dev/null || true
|
||||
git branch $BRANCH HEAD
|
||||
git checkout $BRANCH
|
||||
if [ "$EVENT_NAME" = "pull_request" ]; then
|
||||
BRANCH="$HEAD_REF"
|
||||
else
|
||||
BRANCH="$REF_NAME"
|
||||
fi
|
||||
git branch -D "$BRANCH" 2>/dev/null || true
|
||||
git branch "$BRANCH" HEAD
|
||||
git checkout "$BRANCH"
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
|
@ -103,11 +119,19 @@ jobs:
|
|||
|
||||
- name: Use local branch
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
|
||||
git branch -D $BRANCH 2>/dev/null || true
|
||||
git branch $BRANCH HEAD
|
||||
git checkout $BRANCH
|
||||
if [ "$EVENT_NAME" = "pull_request" ]; then
|
||||
BRANCH="$HEAD_REF"
|
||||
else
|
||||
BRANCH="$REF_NAME"
|
||||
fi
|
||||
git branch -D "$BRANCH" 2>/dev/null || true
|
||||
git branch "$BRANCH" HEAD
|
||||
git checkout "$BRANCH"
|
||||
|
||||
- name: Install PHP with extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
|
@ -153,11 +177,19 @@ jobs:
|
|||
|
||||
- name: Use local branch
|
||||
shell: bash
|
||||
env:
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
|
||||
git branch -D $BRANCH 2>/dev/null || true
|
||||
git branch $BRANCH HEAD
|
||||
git checkout $BRANCH
|
||||
if [ "$EVENT_NAME" = "pull_request" ]; then
|
||||
BRANCH="$HEAD_REF"
|
||||
else
|
||||
BRANCH="$REF_NAME"
|
||||
fi
|
||||
git branch -D "$BRANCH" 2>/dev/null || true
|
||||
git branch "$BRANCH" HEAD
|
||||
git checkout "$BRANCH"
|
||||
|
||||
- name: Install PHP with extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
|
|
|||
Loading…
Reference in New Issue