Skip to content

Commit 7184bc6

Browse files
first commit to init the project
1 parent 1ecc075 commit 7184bc6

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM php:8.0-alpine
2+
3+
LABEL "com.github.actions.name"="PHPArkitect-arkitect"
4+
LABEL "com.github.actions.description"="arkitect"
5+
LABEL "com.github.actions.icon"="check"
6+
LABEL "com.github.actions.color"="blue"
7+
8+
LABEL "repository"="http://github.com/phparkitect/arkitect-github-actions"
9+
LABEL "homepage"="http://github.com/actions"
10+
LABEL "maintainer"="Alessandro Minoccheri <[email protected]>"
11+
12+
COPY --from=composer:2.0.8 /usr/bin/composer /usr/local/bin/composer
13+
14+
RUN mkdir /composer
15+
ENV COMPOSER_HOME=/composer
16+
17+
RUN echo "memory_limit=-1" > $PHP_INI_DIR/conf.d/memory-limit.ini
18+
19+
ENV VERSION=0.2.10
20+
21+
RUN composer global require phparkitect/phparkitect $VERSION \
22+
&& composer global show "*phparkitect*"
23+
24+
ADD entrypoint.sh /entrypoint.sh
25+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GithubAction for Arkitect
2+
3+
This repository is created for run PHPArkitect into Github Action
4+
5+
## Usage
6+
You can use it as a Github Action like this:
7+
8+
```yaml
9+
# .github/workflows/test.yml
10+
11+
on:
12+
push:
13+
branches:
14+
- master
15+
pull_request:
16+
17+
name: Test
18+
19+
jobs:
20+
phpstan:
21+
name: PHPArkitect
22+
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: "Checkout"
27+
uses: actions/checkout@v2
28+
29+
- name: PHPArkitect
30+
uses: docker://phparkitect/phparkitect
31+
with:
32+
args: check
33+
```

action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
2+
3+
author: 'AlessandroMinoccheri'
4+
5+
branding:
6+
icon: 'check'
7+
color: 'blue'
8+
9+
description: 'Use Arkitect via GithubAction.'
10+
11+
name: 'phparkitect-arkitect'
12+
13+
runs:
14+
using: 'docker'
15+
image: 'docker://phparkitect/phparkitect:latest'

entrypoint.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh -l
2+
3+
/composer/vendor/bin/phparkitect --version
4+
5+
IGNORE_PLATFORM_REQS=""
6+
if [ "$CHECK_PLATFORM_REQUIREMENTS" = "false" ]; then
7+
IGNORE_PLATFORM_REQS="--ignore-platform-reqs"
8+
fi
9+
10+
NO_DEV="--no-dev"
11+
if [ "$REQUIRE_DEV" = "true" ]; then
12+
NO_DEV=""
13+
fi
14+
15+
COMPOSER_COMMAND="composer install --no-progress $NO_DEV $IGNORE_PLATFORM_REQS"
16+
echo "::group::$COMPOSER_COMMAND"
17+
$COMPOSER_COMMAND
18+
echo "::endgroup::"
19+
/composer/vendor/bin/phparkitect $*

0 commit comments

Comments
 (0)