Here are the reusable workflows used by all XNXK projects.
This reusable workflow is used to fix the code style of PHP files. is will fix the code style and create a fix pull request.
uses: XNXKTech/workflows/.github/workflows/php-format.yml@main
secrets:
CI_PAT: ${{ secrets.CI_PAT }}
The CI_PAT
is the personal access token of the GitHub account.
The versions
and stability
actually is sequence, to support strategy matrix needed by the workflow. if you don't need strategy matrix, you can use "['8.0']"
or ignore versions
and stability
. it defaults to be the same as "['8.0']"
and "['prefer-stable']"
.
uses: XNXKTech/workflows/.github/workflows/laravel-test.yml@main
with:
versions: "['8.0', '8.1']"
stability: "['prefer-lowest', 'prefer-stable']"
input | required | default | description |
---|---|---|---|
versions |
β | "['8.0']" |
Stringified JSON object listing target PHP versions |
stability |
β | "['prefer-stable']" |
Stringified JSON object listing target PHP stability |
command |
β | Command to prepare Laravel Application | |
database |
β | postgres:12.4-alpine |
Database to use for testing |
db_user |
β | postgres |
Database user to use for testing |
redis |
β | redis:5.0-alpine |
Redis to use for testing |
extensions |
β | dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, memcached, gmp |
List of PHP extensions to install |
coverage |
β | xdebug |
Enable PHP code coverage |
tools |
β | php-cs-fixer, phpunit |
List of tools to install |
composer_version |
β | v2 |
Version of Composer to use |
uses: XNXKTech/workflows/.github/workflows/laravel-insights.yml@main
with:
versions: "['8.0', '8.1']"
stability: "['prefer-lowest', 'prefer-stable']"
cloudbase:
name: TCB
uses: XNXKTech/workflows/.github/workflows/cloudbase.yml@main
with:
environment: Production
environment_url: https://www.xnxk.com
secrets:
SECRET_ID: ${{ secrets.TCB_SECRET_ID }}
SECRET_KEY: ${{ secrets.TCB_SECRET_KEY }}
ENV_ID: ${{ secrets.ENV_ID }}
terraform:
name: Terraform
uses: XNXKTech/workflows/.github/workflows/terraform.yml@main
with:
directory: "['github/teams']"
env: TF_VAR_organization=XNXKTech
secrets:
GH_TOKEN: ${{ secrets.CI_PAT }}
TENCENTCLOUD_SECRET_ID: ${{ secrets.TENCENTCLOUD_SECRET_ID }}
TENCENTCLOUD_SECRET_KEY: ${{ secrets.TENCENTCLOUD_SECRET_KEY }}
This workflow is used to rebase the pull request automatically.
uses: XNXKTech/workflows/.github/workflows/auto-rebase.yml@main
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This workflow is used to automatically merge dependabot pull requests.
The DEPENDABOT_TOKEN
is dependabot token of the GitHub account. It needs to be set in Dependabot secrets, not Actions secrets.
uses: XNXKTech/workflows/.github/workflows/dependabot-auto-merge.yml@main
secrets:
GH_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
input | required | default | description |
---|---|---|---|
target |
β | patch |
The target branch to merge into. |
command |
β | squash and merge |
The command to run. |
botName |
β | starfire-bot |
The name of the bot. |
input | required | description |
---|---|---|
GH_TOKEN |
β | The dependabot token. |
The code in this repository, unless otherwise noted, is under the terms of both the Anti 996 License and the Apache License (Version 2.0).