Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e88c14

Browse files
committed
Update: block emails only uses hosts.yml
1 parent78b5e08 commit9e88c14

File tree

2 files changed

+17
-30
lines changed

2 files changed

+17
-30
lines changed

‎README.md‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
|---------------|---------|----------------------------------------------------------------|--------------------------------|
5555
| `user` | null | valid username. eg:`root`| Username for ssh. |
5656
| `deploy_path` | null | valid path. eg:`/opt/easyengine/sites/example.com/app/htdocs`| path where action will deploy. |
57-
| `hostname` | null | hostname. eg:`example.com`| hostname for ssh. |
57+
| `hostname` | null | hostname/ip. eg:`example.com`| hostname for ssh. |
5858

5959

6060
### Optional
@@ -71,21 +71,20 @@ jobs:
7171

7272
This GitHub action's behavior can be customized using following environment variables:
7373

74-
| Variable | Default | Possible Values | Purpose |
75-
| ------------------ | --------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
76-
| `MU_PLUGINS_URL` | null | vip, any git repo url | If value is `vip`, then action will clone [VIP's MU plugins](https://github.com/Automattic/vip-mu-plugins-public) as `mu-plugins` folder. If you want to specifiy a non-VIP mu-plugins repo, you can provide a publicly accessible mu-plugins repo URL as the value. |
77-
| `WP_VERSION` | latest | Any valid WordPress version | If you specify a WordPress version, then that speicifc WordPress version will be downloaded, instead of latest WordPress version. **Note:** Please use double quotes while giving value to this variable. Also, `WP_VERSION`, if defined in hosts.yml will have higher priority then the one defined in workflow file. |
78-
| `WP_MINOR_UPDATE` | null | `true` / `false` | If set to `true`, latest minor version of `WP_VERSION` will be taken. |
79-
| `JUMPHOST_SERVER` | null | Hostname/IP address of the jumphost server | If the deployment server is not directly accessible, and needs a jumphost, then this method should be used. (Note:The `SSH_PRIVATE_KEY` env variable should have access to the jumphost as well as deployment server for this to work. Also, this method does not work with vault.) |
80-
| `SUBMODULE_DEPLOY_KEY` | null | Read access deploy key created in the submodule repo's deploy keys. | Only required for privated submodule repo. For now only one private submodule deploy key is allowed. All public submodules in repo will be fetched by default without the need of this env variable. (To create a deploy key go to:Settings > Deploy Keys > Add deploy key) |
81-
| `SKIP_WP_TASKS` | null | `true`/`false` | If set to `true`, WordPress specific deplyment tasks will skipped. |
82-
| `PHP_VERSION` | 7.4 | Valid PHP version | Determines the cachetool version compatible to use for purging opcache. |
83-
| `NPM_VERSION` | null | Valid NPM Version | NPM Version. If not specified, latest version will be used. |
84-
| `NODE_VERSION` | null | Valid Node Version | If not specified, default version built into action will be used. |
85-
| `NODE_BUILD_DIRECTORY` | null | path to valid directory on repository. | Build directory. Generally root directory or directory like frontend. |
86-
| `NODE_BUILD_COMMAND` | null | `npm run build` or similar command. | Command used to to build the dependencies needed on deployment. |
87-
| `NODE_BUILD_SCRIPT` | null | path to valid shell script | Custom or predefined script to run after compilation. |
88-
| `BLOCK_EMAILS` | null | `true`/`false` | If set to true, this will enable email blocking functionality. |
74+
| Variable | Default | Possible Values | Purpose |
75+
|------------------------|---------|---------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
76+
| `MU_PLUGINS_URL` | null | vip, any git repo url | If value is `vip`, then action will clone [VIP's MU plugins](https://github.com/Automattic/vip-mu-plugins-public) as `mu-plugins` folder. If you want to specifiy a non-VIP mu-plugins repo, you can provide a publicly accessible mu-plugins repo URL as the value. |
77+
| `WP_VERSION` | latest | Any valid WordPress version | If you specify a WordPress version, then that speicifc WordPress version will be downloaded, instead of latest WordPress version. **Note:** Please use double quotes while giving value to this variable. Also, `WP_VERSION`, if defined in hosts.yml will have higher priority then the one defined in workflow file. |
78+
| `WP_MINOR_UPDATE` | null | `true` / `false` | If set to `true`, latest minor version of `WP_VERSION` will be taken. |
79+
| `JUMPHOST_SERVER` | null | Hostname/IP address of the jumphost server | If the deployment server is not directly accessible, and needs a jumphost, then this method should be used. (Note:The `SSH_PRIVATE_KEY` env variable should have access to the jumphost as well as deployment server for this to work. Also, this method does not work with vault.) |
80+
| `SUBMODULE_DEPLOY_KEY` | null | Read access deploy key created in the submodule repo's deploy keys. | Only required for privated submodule repo. For now only one private submodule deploy key is allowed. All public submodules in repo will be fetched by default without the need of this env variable. (To create a deploy key go to:Settings > Deploy Keys > Add deploy key) |
81+
| `SKIP_WP_TASKS` | null | `true`/`false` | If set to `true`, WordPress specific deplyment tasks will skipped. |
82+
| `PHP_VERSION` | 7.4 | Valid PHP version | Determines the cachetool version compatible to use for purging opcache. |
83+
| `NPM_VERSION` | null | Valid NPM Version | NPM Version. If not specified, latest version will be used. |
84+
| `NODE_VERSION` | null | Valid Node Version | If not specified, default version built into action will be used. |
85+
| `NODE_BUILD_DIRECTORY` | null | path to valid directory on repository. | Build directory. Generally root directory or directory like frontend. |
86+
| `NODE_BUILD_COMMAND` | null | `npm run build` or similar command. | Command used to to build the dependencies needed on deployment. |
87+
| `NODE_BUILD_SCRIPT` | null | path to valid shell script | Custom or predefined script to run after compilation. |
8988

9089
All node related variables are completely optional. You can use them if your site needs to have node dependencies built.
9190

‎main.sh‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -270,26 +270,14 @@ function block_emails() {
270270

271271
hosts_block_email=$(shyaml get-value"$GITHUB_BRANCH.block_emails"<"$hosts_file"2>/dev/null||exit 0)
272272

273-
# priority: hosts.yml > workflow
274273
if [[-n"$hosts_block_email" ]];then
275-
276274
match_hosts_block_email=$(echo"$hosts_block_email"| awk'{$1=$1;print tolower($0)}')
277-
278-
if [["${match_hosts_block_email}"=='true' ]];then
279-
BLOCK_EMAILS="$hosts_block_email"
280-
else
281-
BLOCK_EMAILS=''
282-
fi
283-
fi
284-
285-
if [[-n"$BLOCK_EMAILS" ]];then
286-
MATCH_BLOCK_EMAIL=$(echo"$BLOCK_EMAILS"| awk'{$1=$1;print tolower($0)}')
287275
fi
288276

289-
if [["$MATCH_BLOCK_EMAIL"=='true' ]];then
277+
if [["$match_hosts_block_email"=='true' ]];then
290278

291279
# priority: 1. hosts.yml 2. vip 3. WP
292-
echo -e"\033[34mSETUP EMAIL BLOCKING\033[0m"
280+
echo -e"\033[34mSETTING UP EMAIL BLOCKING\033[0m"
293281

294282
hosts_block_email_dir=$(shyaml get-value"$GITHUB_BRANCH.block_emails_plugin_path"<"$hosts_file"2>/dev/null||exit 0)
295283

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp