Skip to content

Commit

Permalink
adding one example for laravel projects
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloChianfa committed Dec 8, 2023
1 parent 94e91cc commit eed213b
Show file tree
Hide file tree
Showing 8 changed files with 13,554 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_DEFAULT_STYLE: prettier
VALIDATE_ALL_CODEBASE: true
VALIDATE_MARKDOWN: false
VALIDATE_JSCPD: false
68 changes: 59 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GitHub Super-Linter](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml)
[![CI](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml)

Automate and streamline IonCube encoding for your PHP project under Laravel, Joomla, Wordpress frameworks with this powerful GitHub Action. Encode your source code effortlessly, ensuring an extra layer of security for your proprietary codebase.
Automate and streamline IonCube encoding for your PHP project under Laravel, Joomla, WordPress frameworks with this powerful GitHub Action. Encode your source code effortlessly, ensuring an extra layer of security for your proprietary codebase.

## Features

Expand All @@ -17,12 +17,13 @@ Automate and streamline IonCube encoding for your PHP project under Laravel, Joo

## Getting Started

- **Setup Secrets**: Create a secret named IONCUBE_PASSPHRASE containing the passphrase to encode files.
- **Configure Workflow**: Copy the example workflow into your project's .github/workflows directory, adjusting parameters as needed.
- **Run Workflow**: Push your changes to trigger the IonCube encoding workflow and enjoy the automated process.

### Usage

> For vanilla PHP projects:
```yaml
name: Encode with IonCube

Expand All @@ -43,15 +44,64 @@ jobs:
output: 'encrypted'
```
> For Laravel projects:
- **Setup Secrets**: Create a secret named IONCUBE_PASSPHRASE containing the passphrase to encode files.
- **Install composer packages**: Sometimes you need to install the composer packages before of project encode.
```yaml
name: Encode Laravel with IonCube

on: [push]

jobs:
encode:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: IonCube Encode Project
uses: murilochianfa/ioncube-encode-action@v1.0.0
with:
source: 'src'
output: 'encrypted'
passphrase: ${{ secrets.IONCUBE_PASSPHRASE }}
# License file path in runtime
with-license: /opt/project/license
# Callback file path in runtime
callback-file: /opt/project/public/ioncube.php

- name: IonCube Encode Callback File
uses: murilochianfa/ioncube-encode-action@v1.0.0
with:
source: 'src/public/ioncube.php'
output: 'encrypted/public/ioncube.php'
passphrase: ${{ secrets.IONCUBE_PASSPHRASE }}
```
### Inputs
- ***template***: The template to choose the best parameters for type of projects.
- ***trial***: Encode file with trial version of ioncube.
- ***source***: The file or directory containing your PHP project.
- ***output***: The file or directory where the encoded project will be saved.
- ***encoder-version***: The Ioncube encoder version.
- ***php-target-version***: The PHP encoded files target version.
- ***arch***: Architecture of target environment runner.
- ***trial***: Encode file with trial version of ioncube. *(default: true)*
- ***template***: The template to choose the best parameters for type of projects. *(default: php)*
- ***source***: The file or directory containing your PHP project. *(default: src)*
- ***output***: The file or directory where the encoded project will be saved. *(default: encrypted)*
- ***encoder-version***: The Ioncube encoder version. *(default: current)*
- ***php-target-version***: The PHP encoded files target version. *(default: 8.2)*
- ***arch***: Architecture of target environment runner. *(default: 64)*
- ***allow-reflection***: Name or glob to funcions or classes for allow the reflection API. *(default: false)*
- ***allow-reflection-all***: Allow the reflection API at all the PHP code. *(default: false)*
- ***encrypt***: Name or glob to files to encrypt. *(default: false)*
- ***binary***: Encode files in binary format. *(default: false)*
- ***optimize***: Level of encoding performance. *(default: more)*
- ***no-doc-comments***: Not allow doc comments on encoded files. *(default: false)*
- ***without-loader-check***: Disable the ioncube loader installation verification. *(default: false)*
- ***preamble-file***: File for insert into header of all encoded files. *(default: false)*
- ***passphrase***: Text to identify and encode the project unically. *(default: false)*
- ***license-check***: Mode of license validation for encoded files. *(default: auto)*
- ***with-license***: The license file path at runtime environment. *(default: false)*
- ***callback-file***: File to validate manually when license is invalid. *(default: false)*
<hr>
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ inputs:
optimize:
description: 'Level of encoding performance'
required: true
default: 'max'
default: 'more'
type: choice
options:
- 'more'
Expand Down
Loading

0 comments on commit eed213b

Please sign in to comment.