-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved back installer into the project.
- Loading branch information
1 parent
94a3b25
commit 77ecd5c
Showing
51 changed files
with
3,968 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This action is used for Vortex maintenance. It will not be used in the scaffolded project. | ||
name: Vortex - Release installer | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- '**release-installer**' | ||
|
||
jobs: | ||
vortex-release-installer: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
working-directory: .vortex/installer | ||
|
||
- name: Add version | ||
run: | | ||
TAG=${{ github.ref_type == 'tag' && github.ref_name || '' }} | ||
SHA=${{ github.ref_type == 'branch' && github.sha || '' }} | ||
sed -i "s/\"git-tag-ci\": \"dev\"/\"git-tag-ci\": \"${TAG:-${SHA}}\"/g" box.json | ||
working-directory: .vortex/installer | ||
|
||
- name: Build PHAR | ||
run: composer build | ||
working-directory: .vortex/installer | ||
|
||
- name: Test PHAR | ||
run: ./.build/installer --quiet || exit 1 | ||
working-directory: .vortex/installer | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: vortex-installer | ||
path: .vortex/installer/.build/installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This action is used for Vortex maintenance. It will not be used in the scaffolded project. | ||
name: Vortex - Test installer | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
|
||
jobs: | ||
vortex-test-installer: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3'] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
working-directory: .vortex/installer | ||
|
||
- name: Check coding standards | ||
run: composer lint | ||
working-directory: .vortex/installer | ||
|
||
- name: Run tests | ||
run: XDEBUG_MODE=coverage composer test | ||
working-directory: .vortex/installer | ||
|
||
- name: Upload coverage report as an artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{github.job}}-code-coverage-report-${{ matrix.php-versions }} | ||
path: .vortex/installer/.coverage-html | ||
|
||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: .vortex/installer/cobertura.xml | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# Smoke test for PHAR. | ||
- name: Build PHAR | ||
run: composer build | ||
working-directory: .vortex/installer | ||
|
||
- name: Test PHAR | ||
run: .vortex/installer/.build/installer --quiet || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Release PHP | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release-php: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Add version | ||
run: | | ||
TAG=${{ github.ref_type == 'tag' && github.ref_name || '' }} | ||
SHA=${{ github.ref_type == 'branch' && github.sha || '' }} | ||
sed -i "s/\"git-tag-ci\": \"dev\"/\"git-tag-ci\": \"${TAG:-${SHA}}\"/g" box.json | ||
- name: Build PHAR | ||
run: composer build | ||
|
||
- name: Test PHAR | ||
run: ./.build/installer --quiet || exit 1 | ||
|
||
- name: Prepare publish artifact | ||
run: | | ||
mkdir -p /tmp/installer/docs | ||
cp .build/installer /tmp/installer/docs/index.html | ||
echo "install.drevops.com" > /tmp/installer/docs/CNAME | ||
- name: Setup SSH private key | ||
uses: webfactory/ssh-agent@v0.9.0 | ||
with: | ||
ssh-private-key: ${{ secrets.PUBLISH_SSH_PRIVATE_KEY }} | ||
|
||
- name: Publish | ||
run: | | ||
DST_BRANCH=bin | ||
git config --global user.name "Deployment robot" | ||
git config --global user.email "deploy+installer@drevops.com" | ||
cd /tmp/installer | ||
git init | ||
git checkout -b "${DST_BRANCH}" | ||
git add -A | ||
git commit -m "Automatically pushed from drevops/vortex-installer 'main' branch." | ||
git remote add origin git@github.com:drevops/vortex-installer.git | ||
git push origin "${DST_BRANCH}" --force | ||
- name: Get tag name | ||
if: github.ref_type == 'tag' | ||
id: get-version | ||
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Create Release | ||
if: github.ref_type == 'tag' | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
./.build/installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Test PHP | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
|
||
jobs: | ||
test-php: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2', '8.3'] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Check coding standards | ||
run: composer lint | ||
|
||
- name: Run tests | ||
run: XDEBUG_MODE=coverage composer test | ||
|
||
- name: Upload coverage report as an artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{github.job}}-code-coverage-report-${{ matrix.php-versions }} | ||
path: .coverage-html | ||
|
||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: cobertura.xml | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# Smoke test for PHAR. | ||
- name: Build PHAR | ||
run: composer build | ||
|
||
- name: Test PHAR | ||
run: ./.build/installer --quiet || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.build | ||
/.coverage-html | ||
/.phpunit.cache | ||
/cobertura.xml | ||
/composer.lock | ||
/vendor | ||
/vendor-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<p align="center"> | ||
<a href="" rel="noopener"> | ||
<img width=200px height=200px src="https://placehold.jp/000000/ffffff/200x200.png?text=DrevOps+Installer&css=%7B%22border-radius%22%3A%22%20100px%22%7D" alt="DrevOps Installer logo"></a> | ||
</p> | ||
|
||
<h1 align="center">Installer for <a href="https://github.com/drevops/vortex">Vortex</a> project.</h1> | ||
|
||
<div align="center"> | ||
|
||
[![GitHub Issues](https://img.shields.io/github/issues/drevops/vortex-installer.svg)](https://github.com/drevops/vortex-installer/issues) | ||
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/drevops/vortex-installer.svg)](https://github.com/drevops/vortex-installer/pulls) | ||
[![Test PHP](https://github.com/drevops/vortex-installer/actions/workflows/test-php.yml/badge.svg)](https://github.com/drevops/vortex-installer/actions/workflows/test-php.yml) | ||
[![codecov](https://codecov.io/gh/drevops/vortex-installer/graph/badge.svg?token=K9SPETWCJR)](https://codecov.io/gh/drevops/vortex-installer) | ||
![GitHub release (latest by date)](https://img.shields.io/github/v/release/drevops/vortex-installer) | ||
![LICENSE](https://img.shields.io/github/license/drevops/vortex-installer) | ||
![Renovate](https://img.shields.io/badge/renovate-enabled-green?logo=renovatebot) | ||
|
||
</div> | ||
|
||
> [!IMPORTANT] | ||
> We are working on the `v2` on the installer in | ||
> the [`2.x`](https://github.com/drevops/vortex-installer/tree/2.x) branch. | ||
## Installation | ||
|
||
Download and run the latest version of the installer: | ||
|
||
```bash | ||
curl -SsL https://install.drevops.com > install.php | ||
php install.php | ||
rm -r install.php | ||
``` | ||
|
||
## Maintenance | ||
|
||
composer install | ||
composer lint | ||
composer test | ||
|
||
### Releasing | ||
|
||
The installer is packaged as a PHAR and deployed to https://install.drevops.com/ upon each GitHub release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"output": ".build/installer", | ||
"banner": [ | ||
"@file", | ||
"Vortex CLI installer.", | ||
"", | ||
"<!-- -->", | ||
"CLI installer for <a href=\"https://github.com/drevops/vortex\">Vortex</a> project.<br/>", | ||
"Run in your terminal:<br/>", | ||
"<code>curl -SsL https://install.drevops.com > install.php && php install.php; rm -r install.php</code><br/>", | ||
"More details: <a href=\"https://vortex.drevops.com\">https://vortex.drevops.com</a>", | ||
"<!--" | ||
], | ||
"finder": [ | ||
{ | ||
"in": "./", | ||
"exclude": [ | ||
"tests", | ||
"vendor-bin" | ||
] | ||
} | ||
], | ||
"blacklist": [ | ||
"box.json", | ||
"phpcs.xml", | ||
"phpmd.xml", | ||
"phpstan.neon" | ||
], | ||
"replacements": { | ||
"git-tag-ci": "dev" | ||
} | ||
} |
Oops, something went wrong.
77ecd5c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Deployed on https://66d433017f08f40575b2fc06--vortex-docs.netlify.app