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 dc6bc85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 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-filter: 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-filter: phpdraft
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ 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
RUN php -d phar.readonly=0 ./vendor/bin/phing phar-nightly
RUN ls -al /usr/src/phpdraft/build/out/
COPY /usr/src/phpdraft/build/out/phpdraft-nightly.phar /usr/local/bin/phpdraft
RUN chmod +x /usr/local/bin/phpdraft

Expand Down

0 comments on commit dc6bc85

Please sign in to comment.