diff --git a/.github/workflows/code-standards.yml b/.github/workflows/code-standards.yml index 79bb17b..d18b021 100644 --- a/.github/workflows/code-standards.yml +++ b/.github/workflows/code-standards.yml @@ -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 "") diff --git a/.github/workflows/doctum.yml b/.github/workflows/doctum.yml index e0076db..f7d1616 100644 --- a/.github/workflows/doctum.yml +++ b/.github/workflows/doctum.yml @@ -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'); @@ -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%', @@ -84,12 +84,6 @@ 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 @@ -97,6 +91,12 @@ jobs: 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: | diff --git a/composer.json b/composer.json index 3df40ea..7ae086c 100644 --- a/composer.json +++ b/composer.json @@ -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 + } } }