Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/code-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ jobs:
- name: Run PHP CS Fixer
run: |
# set environment variables in script
export RULES=$(echo $'${INPUTS_RULES} ${INPUTS_ADD_RULES}'|tr -d '\n\t\r '|jq -s '.[0] * .[1]' -crM)
export EXCLUDE_PATTERNS=$(echo $'${INPUTS_EXCLUDE_PATTERNS}'|tr -d '\n\t\r ')
export RULES=$(echo ${INPUTS_RULES} ${INPUTS_ADD_RULES}|tr -d '\n\t\r '|jq -s '.[0] * .[1]' -crM)
export EXCLUDE_PATTERNS=$(echo ${INPUTS_EXCLUDE_PATTERNS}|tr -d '\n\t\r ')

# use config path only if EXCLUDE_PATTERN is empty
CMD_PATH=$([ "$EXCLUDE_PATTERNS" = "" ] && echo "$CONFIG_PATH" || echo "")
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/doctum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
use Doctum\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;

$defaultVersion = '${INPUTS_DEFAULT_VERSION}';
$tagPattern = '${INPUTS_TAG_PATTERN}';
$defaultVersion = getenv('INPUTS_DEFAULT_VERSION');
$tagPattern = getenv('INPUTS_TAG_PATTERN');

$iterator = Finder::create()
->files()
->name('*.php')
->notName('${INPUTS_EXCLUDE_FILE}')
->notName(getenv('INPUTS_EXCLUDE_FILE'))
->exclude('GPBMetadata')
->in(__DIR__ . '/src');

Expand All @@ -71,8 +71,8 @@ jobs:
}

return new Doctum($iterator, [
'title' => '${INPUTS_TITLE}',
'theme' => '${INPUTS_THEME}',
'title' => getenv('INPUTS_TITLE'),
'theme' => getenv('INPUTS_THEME'),
'versions' => $versions,
'build_dir' => __DIR__ . '/.build/%version%',
'cache_dir' => __DIR__ . '/.cache/%version%',
Expand All @@ -84,19 +84,19 @@ jobs:
)
echo "$DOCTUM_CONFIG"; # for debugging
echo "$DOCTUM_CONFIG" > doctum-config.php;
env:
INPUTS_DEFAULT_VERSION: ${{ inputs.default_version }}
INPUTS_TAG_PATTERN: ${{ inputs.tag_pattern }}
INPUTS_EXCLUDE_FILE: ${{ inputs.exclude_file }}
INPUTS_TITLE: ${{ inputs.title }}
INPUTS_THEME: ${{ inputs.theme }}
- name: Run Doctum to Generate Documentation
run: |
php doctum.phar update doctum-config.php --ignore-parse-errors
if [ ! -d .build ]; then
echo "Action did not generate any documentation. Did you forget to provide a default_version or tag_pattern?";
exit 1;
fi
env:
INPUTS_DEFAULT_VERSION: ${{ inputs.default_version }}
INPUTS_TAG_PATTERN: ${{ inputs.tag_pattern }}
INPUTS_EXCLUDE_FILE: ${{ inputs.exclude_file }}
INPUTS_TITLE: ${{ inputs.title }}
INPUTS_THEME: ${{ inputs.theme }}
- if: inputs.default_version
name: Redirect Index to Latest Version
run: |
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,10 @@
"google/cloud-dlp": "^1.10",
"google/cloud-storage": "^1.33",
"google/cloud-secret-manager": "^1.12"
},
"config": {
"audit": {
"block-insecure": false
}
}
}