Skip to content

Commit dc6bc85

Browse files
committed
fix: make phar in docker
1 parent 39d0ac2 commit dc6bc85

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/docker.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,35 @@ jobs:
2828
username: ${{ github.actor }}
2929
password: ${{ secrets.GITHUB_TOKEN }}
3030

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

37-
- name: Extract metadata (tags, labels) for Docker
38-
id: meta
39-
uses: docker/metadata-action@master
40-
with:
41-
images: ${{ env.REGISTRY }}/${{ github.repository }}
42-
43-
- name: Build and push Docker image
37+
- name: Build and push drafter Docker image
4438
uses: docker/build-push-action@master
4539
with:
4640
context: .
4741
push: true
4842
tags: ${{ steps.meta-drafter.outputs.tags }}
4943
labels: ${{ steps.meta-drafter.outputs.labels }}
5044
target: drafter-build
45+
no-cache-filter: drafter-build
5146
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/drafter:latest
5247

53-
- name: Build and push Docker image
48+
- name: Extract metadata (tags, labels) for PHPDraft
49+
id: meta
50+
uses: docker/metadata-action@master
51+
with:
52+
images: ${{ env.REGISTRY }}/${{ github.repository }}
53+
54+
- name: Build and push PHPDraft Docker image
5455
uses: docker/build-push-action@master
5556
with:
5657
context: .
5758
push: true
5859
tags: ${{ steps.meta.outputs.tags }}
5960
labels: ${{ steps.meta.outputs.labels }}
60-
target: phpdraft
61+
target: phpdraft
62+
no-cache-filter: phpdraft

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ FROM php:8.3-cli-bullseye AS phpdraft-build
2929
COPY --from=composer /usr/src/phpdraft /usr/src/phpdraft
3030
WORKDIR /usr/src/phpdraft
3131

32-
RUN ./vendor/bin/phing phar-nightly
32+
RUN php -d phar.readonly=0 ./vendor/bin/phing phar-nightly
33+
RUN ls -al /usr/src/phpdraft/build/out/
3334
COPY /usr/src/phpdraft/build/out/phpdraft-nightly.phar /usr/local/bin/phpdraft
3435
RUN chmod +x /usr/local/bin/phpdraft
3536

0 commit comments

Comments
 (0)