Skip to content

Commit fbae1e7

Browse files
authored
remove insecure github action commands and replace it with safer one (#2217)
1 parent bbdd16f commit fbae1e7

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,14 @@ jobs:
110110
ARCH=32
111111
PLATFORM=x86
112112
fi
113-
echo "::set-env name=ARCH::$ARCH"
114-
echo "::set-env name=PLATFORM::$PLATFORM"
113+
echo "ARCH=$ARCH" >> $GITHUB_ENV
114+
echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV
115115
116116
# libminiupnp / natpmp
117117
if [[ '${{ runner.os }}' == 'Linux' && '${{ matrix.target.cpu }}' == 'i386' ]]; then
118118
export CFLAGS="${CFLAGS} -m32 -mno-adx"
119-
echo "::set-env name=CFLAGS::$CFLAGS"
119+
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV
120120
fi
121-
env:
122-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
123121
124122
- name: Install build dependencies (Linux i386)
125123
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
@@ -138,9 +136,7 @@ jobs:
138136
exec $(which g++) -m32 -mno-adx "\$@"
139137
EOF
140138
chmod 755 external/bin/gcc external/bin/g++
141-
echo '::add-path::${{ github.workspace }}/external/bin'
142-
env:
143-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
139+
echo "${{ github.workspace }}/external/bin" >> $GITHUB_PATH
144140
145141
- name: Restore MinGW-W64 (Windows) from cache
146142
if: runner.os == 'Windows'
@@ -184,10 +180,8 @@ jobs:
184180
runner.os == 'Windows'
185181
shell: bash
186182
run: |
187-
echo '::add-path::${{ github.workspace }}'"/external/mingw-${{ matrix.target.cpu }}/bin"
188-
echo '::add-path::${{ github.workspace }}'"/external/dlls-${{ matrix.target.cpu }}"
189-
env:
190-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
183+
echo "${{ github.workspace }}/external/mingw-${{ matrix.target.cpu }}/bin" >> $GITHUB_PATH
184+
echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH
191185
192186
- name: Install build dependencies (MacOS)
193187
if: runner.os == 'macOS'

0 commit comments

Comments
 (0)