Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Commit 584cd8b

Browse files
committed
Initial commit
0 parents  commit 584cd8b

File tree

10 files changed

+4158
-0
lines changed

10 files changed

+4158
-0
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: "docker"
10+
directory: "/"
11+
# Check for updates once a week
12+
schedule:
13+
interval: "weekly"
14+
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
push:
3+
branch:
4+
- latest
5+
release:
6+
name: ci
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Build
13+
uses: elgohr/Publish-Docker-Github-Action@master
14+
with:
15+
name: phpdoc/phar-ga
16+
username: ${{ secrets.DOCKER_USERNAME }}
17+
password: ${{ secrets.DOCKER_PASSWORD }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM composer:1.10 AS composer
2+
3+
FROM php:7.4-alpine
4+
5+
COPY . /opt/phpdoc
6+
WORKDIR /opt/phpdoc
7+
8+
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
9+
10+
RUN composer install
11+
RUN apk add --no-cache git gnupg ncurses
12+
13+
COPY entrypoint.sh /entrypoint.sh
14+
ENTRYPOINT ["/entrypoint.sh"]
15+
CMD ["--help"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 phpDocumentor
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Phar github action
2+
3+
This image can be used to create gpg signed phar.
4+
5+
## Usage
6+
7+
The example below will build the phar. You might want to add extra steps
8+
to prepare the environment of your project before executing box.
9+
10+
```
11+
on:
12+
release:
13+
types: [published]
14+
name: Release workflow
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: build phar
20+
uses: docker://phpdoc/phar-ga:master
21+
with:
22+
args: box compile
23+
```
24+
25+
### Sign a artifact
26+
27+
This image supports gpg signatures. The example below shows how to
28+
use a passphase protected key.
29+
30+
Please be aware you are publishing your
31+
secret key on a public website. So we highly recommend you to create a sub key
32+
and do never use your primary keys in a ci like environment.
33+
34+
The image will automatically import the provided `SECRET_KEY`. The `--command-fd 0` flag will
35+
fetch the `PASSPHRASE` STDIN, which will be provided by the image when needed.
36+
37+
```
38+
on:
39+
release:
40+
types: [published]
41+
name: Release workflow
42+
jobs:
43+
release:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: build phar
47+
uses: docker://phpdoc/phar-ga:latest
48+
with:
49+
args: box compile
50+
- name: sign phar
51+
uses: docker://phpdoc/phar-ga:latest
52+
env:
53+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
54+
SECRET_KEY: ${{ secrets.SECRET_KEY }}
55+
with:
56+
args: gpg --command-fd 0 --pinentry-mode loopback -u [email protected] --batch
57+
--detach-sign --output build/phpDocumentor.phar.asc build/phpDocumentor.phar
58+
```

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: "phpdoc-box-action"
2+
description: "phar & release utils container"
3+
branding:
4+
color: green
5+
icon: crosshair
6+
runs:
7+
using: docker
8+
image: docker://phpdoc/phar-ga:latest

composer.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "phpdocumentor/phar-ga",
3+
"type": "project",
4+
"description": "phar & release utils container",
5+
"keywords": [
6+
"phpDocumentor",
7+
"phar",
8+
"box",
9+
"release"
10+
],
11+
"license": "MIT",
12+
"require": {
13+
"php": "^7.2",
14+
"humbug/box": "^3.8"
15+
},
16+
"config": {
17+
"sort-packages": true
18+
}
19+
}

0 commit comments

Comments
 (0)