Skip to content

Commit e8adc43

Browse files
committed
Use GitHub Actions artifacts for moving PHAR file between workflow stages
1 parent 577efc8 commit e8adc43

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ jobs:
5050
files: |
5151
pie.phar
5252
pie.phar.asc
53+
- name: Store PHAR as artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: phar-binary
57+
path: pie.phar
5358

5459
docker-binary-only-image:
5560
needs: release-phar
@@ -65,6 +70,11 @@ jobs:
6570
- name: Checkout repository
6671
uses: actions/checkout@v4
6772

73+
- name: Restore built PHAR
74+
uses: actions/download-artifact@v4
75+
with:
76+
name: phar-binary
77+
6878
- name: Set up QEMU
6979
uses: docker/setup-qemu-action@v3
7080

Dockerfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
FROM curlimages/curl AS phar-downloader
2-
3-
ARG PIE_VERSION
4-
5-
RUN curl -fsSL --output /tmp/pie https://github.com/php/pie/releases/download/${PIE_VERSION}/pie.phar \
6-
&& chmod +x /tmp/pie \
7-
&& curl -fsSL --output /tmp/pie.asc https://github.com/php/pie/releases/download/${PIE_VERSION}/pie.phar.asc
8-
91
FROM scratch AS standalone-binary
102

11-
COPY --from=phar-downloader /tmp/pie /pie
12-
COPY --from=phar-downloader /tmp/pie.asc /pie.asc
3+
COPY pie.phar /pie

0 commit comments

Comments
 (0)