Set phar.readonly=0 #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PHAR | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Download Box | |
run: wget https://github.com/box-project/box/releases/download/4.4.0/box.phar | |
- name: Set phar.readonly=0 | |
run: echo "phar.readonly=0" > /etc/php/8.1/cli/conf.d/99-phar.ini | |
### Debug | |
- name: "Debug: show system env vars" | |
run: export | |
- name: Run phpinfo | |
run: php -i | |
### Prepare for boxing | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Dump system envs to PHP via composer | |
run: composer dump-env prod | |
- name: Cache warmup | |
run: php new-bin/console cache:warmup | |
### Box it | |
- name: Run Box | |
env: | |
BOX_ALLOW_XDEBUG: '1' | |
run: php box.phar compile -v | |
### Post boxing actions | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kopio.phar | |
path: build/kopio.phar |