Skip to content

Commit

Permalink
fix: make phar in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Mar 15, 2024
1 parent 39d0ac2 commit 236021d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,35 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
- name: Extract metadata (tags, labels) for Drafter
id: meta-drafter
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}/drafter

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}

- name: Build and push Docker image
- name: Build and push drafter Docker image
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ steps.meta-drafter.outputs.tags }}
labels: ${{ steps.meta-drafter.outputs.labels }}
target: drafter-build
no-cache-filters: drafter-build
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/drafter:latest

- name: Build and push Docker image
- name: Extract metadata (tags, labels) for PHPDraft
id: meta
uses: docker/metadata-action@master
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}

- name: Build and push PHPDraft Docker image
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: phpdraft
target: phpdraft
no-cache-filters: phpdraft
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ RUN composer install --ignore-platform-req=ext-uopz

FROM php:8.3-cli-bullseye AS phpdraft-build



COPY --from=composer /usr/src/phpdraft /usr/src/phpdraft
WORKDIR /usr/src/phpdraft

RUN ./vendor/bin/phing phar-nightly
COPY /usr/src/phpdraft/build/out/phpdraft-nightly.phar /usr/local/bin/phpdraft
RUN php -d phar.readonly=0 ./vendor/bin/phing phar-nightly

RUN ls -al .

COPY /usr/src/phpdraft/build/out/phpdraft-*.phar /usr/local/bin/phpdraft
RUN chmod +x /usr/local/bin/phpdraft

FROM php:8.3-cli-bullseye AS phpdraft
Expand Down

0 comments on commit 236021d

Please sign in to comment.