Skip to content

Commit 9f1de40

Browse files
committed
615: don't use env. template expansions
1 parent e75b6cf commit 9f1de40

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/build-assets.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,26 @@ jobs:
132132
echo "PIE_BINARY_OUTPUT=pie-${{ runner.os }}-${{ runner.arch }}.exe" >> $env:GITHUB_ENV
133133
134134
- name: Check SPC version
135-
run: ${{ env.SPC_BINARY }} --version
135+
env:
136+
SPC_BINARY: ${{ env.SPC_BINARY }}
137+
run: ${SPC_BINARY} --version
136138

137139
- name: Grab the pie.phar from artifacts
138140
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
139141
with:
140142
name: pie-${{ github.sha }}.phar
141143

142144
- name: Build for ${{ runner.os }} ${{ runner.arch }} on ${{ matrix.operating-system }}
143-
run: ${{ env.SPC_BINARY }} craft resources/spc/craft.yml
145+
run: ${SPC_BINARY} craft resources/spc/craft.yml
144146
env:
147+
SPC_BINARY: ${{ env.SPC_BINARY }}
145148
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+
146150
- name: Bundle pie.phar into executable PIE binary
147-
run: ${{ env.SPC_BINARY }} micro:combine pie.phar --output=${{ env.PIE_BINARY_OUTPUT }}
151+
env:
152+
PIE_BINARY_OUTPUT: ${{ env.PIE_BINARY_OUTPUT }}
153+
SPC_BINARY: ${{ env.SPC_BINARY }}
154+
run: ${SPC_BINARY} micro:combine pie.phar --output=${PIE_BINARY_OUTPUT}
148155

149156
- name: Setup PHP
150157
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 #2.37.2
@@ -153,7 +160,9 @@ jobs:
153160
tools: composer
154161
php-version: "7.4"
155162
- name: Quick validation that the binary runs
156-
run: ./${{ env.PIE_BINARY_OUTPUT }} show --all
163+
env:
164+
PIE_BINARY_OUTPUT: ${{ env.PIE_BINARY_OUTPUT }}
165+
run: ./${PIE_BINARY_OUTPUT} show --all
157166

158167
- name: Generate build provenance attestation
159168
# It does not make sense to do this for PR builds, nor do contributors
@@ -164,7 +173,7 @@ jobs:
164173
if: github.event_name != 'pull_request' && github.event.repository.visibility == 'public'
165174
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 #v4.1.0
166175
with:
167-
subject-path: '${{ github.workspace }}/${{ env.PIE_BINARY_OUTPUT }}'
176+
subject-path: ${{ github.workspace }}/${{ env.PIE_BINARY_OUTPUT }}
168177

169178
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
170179
with:

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ jobs:
104104
DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`
105105
echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV
106106
- name: "Install PHP ${{ matrix.php-versions }}"
107+
env:
108+
php_src_download_url: ${{ env.php_src_download_url }}
107109
run: |
108110
mkdir -p /tmp/php
109111
mkdir -p /tmp/php.ini.d
110112
cd /tmp/php
111-
echo "Downloading release from ${{ env.php_src_download_url }} ..."
112-
wget -O php.tgz ${{ env.php_src_download_url }}
113+
echo "Downloading release from ${php_src_download_url} ..."
114+
wget -O php.tgz ${php_src_download_url}
113115
tar zxf php.tgz
114116
rm php.tgz
115117
ls -l

0 commit comments

Comments
 (0)