Skip to content

Commit

Permalink
Change installation of Box project
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeliot-Tm committed Nov 6, 2024
1 parent 86de93f commit b8c4606
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 45 deletions.
3 changes: 3 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ RUN set -xe; \
chmod +x phive.phar && \
mv phive.phar /usr/local/bin/phive

COPY --from=boxproject/box:latest /box.phar /usr/bin/box
RUN chmod +x /usr/bin/box

WORKDIR /app

COPY composer.* ./
Expand Down
22 changes: 1 addition & 21 deletions .github/workflows/release-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
php-version: 8.2
ini-values: phar.readonly=0
tools: composer
tools: composer, box
coverage: none

- name: Cache Composer packages
Expand All @@ -47,26 +47,6 @@ jobs:
with:
composer-options: '--no-dev'

- name: Cache tools installed with PHIVE
uses: actions/cache@v4
with:
path: "${{ runner.temp }}/.phive"
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-${{ hashFiles('**/.phive/phars.xml', '**/.phive/trust-gpg-keys.txt') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-"

- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"

- name: Install PHP tools by PHIVE
uses: szepeviktor/phive-install@v1
with:
home: "${{ runner.temp }}/.phive"
trustGpgKeys: '$(cat ./.phive/trust-gpg-keys.txt)'
binPath: "${{ github.workspace }}/tools/phive"

- name: Build PHAR
run: composer build

Expand Down
22 changes: 1 addition & 21 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
php-version: 8.2
ini-values: phar.readonly=0
tools: composer
tools: composer, box
coverage: none

- name: Cache Composer packages
Expand All @@ -45,26 +45,6 @@ jobs:
with:
composer-options: '--no-dev'

- name: Cache tools installed with PHIVE
uses: actions/cache@v4
with:
path: "${{ runner.temp }}/.phive"
key: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-${{ hashFiles('**/.phive/phars.xml', '**/.phive/trust-gpg-keys.txt') }}"
restore-keys: "os-${{ runner.os }}-php-${{ runner.php-version }}-phive-"

- name: Install PHIVE
uses: szepeviktor/phive@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"

- name: Install PHP tools by PHIVE
uses: szepeviktor/phive-install@v1
with:
home: "${{ runner.temp }}/.phive"
binPath: "${{ github.workspace }}/tools/phive"
trustGpgKeys: '$(cat ./.phive/trust-gpg-keys.txt)'

- name: Build PHAR
run: composer build

Expand Down
1 change: 0 additions & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
location="./tools/composer-unused.phar"
copy="true"
/>
<phar name="humbug/box" version="^4.6.2" installed="4.6.2" location="./tools/box.phar" copy="true"/>
<phar name="phpunit" version="^11.2.8" installed="11.2.8" location="./tools/phpunit.phar" copy="true"/>
<phar name="php-cs-fixer" version="^3.60.0" installed="3.60.0" location="./tools/php-cs-fixer.phar" copy="true"/>
<phar name="php-cs-fixer-baseline" version="^2.1.2" installed="2.1.2" location="./tools/pcsf-baseline.phar" copy="true"/>
Expand Down
2 changes: 1 addition & 1 deletion .phive/trust-gpg-keys.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
033E5F8D801A2F8D,B1B5F6D21AB070E1,41539BBD4020945DB378F98B2DF45277AEF09A2F,4AA394086372C20A,E82B2FB314E9906E,9204DEE8CAE9C22C,51C67305FFC2E5C0
033E5F8D801A2F8D,B1B5F6D21AB070E1,4AA394086372C20A,E82B2FB314E9906E,9204DEE8CAE9C22C,51C67305FFC2E5C0
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"scripts": {
"build": [
"php scripts/box/prepare-config.php",
"tools/box.phar compile --config=scripts/box/config.json"
"box compile --config=scripts/box/config.json"
],
"check-all": [
"@cs-fixer-check",
Expand Down

0 comments on commit b8c4606

Please sign in to comment.