Skip to content

Integration gcp detectors firebase #2908

Integration gcp detectors firebase

Integration gcp detectors firebase #2908

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Documentation
on: [push, pull_request]
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
name: Skip Duplicate Actions
uses: fkirc/skip-duplicate-actions@v4.0.0
with:
concurrent_skipping: 'same_content'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
paths: '["**.md", "**/readme.yaml", "scripts/**", "Makefile", ".github/workflows/doc.yml"]'
changed_files:
runs-on: ubuntu-latest
outputs:
modules_readme: ${{ steps.changes.outputs.modules_readme }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changes
# Set outputs using the command.
run: |
echo ${GITHUB_REF}
if [ "${GITHUB_REF}" == "refs/heads/master" ]; then
echo "::set-output name=modules_readme::*,"
echo "master detected, consider all files as changed"
else
changed_files=$(git diff --name-only --diff-filter=ACMRT $(git merge-base --fork-point origin/master))
changed_files_readme=$(echo "${changed_files}" | grep 'readme\.yaml$') || changed_files_readme=""
echo ::set-output name=modules_readme::$(dirname $(echo "${changed_files_readme}") | uniq | tr '\n' ',') || true
echo -e "readme changed files:\n${changed_files_readme}"
fi
continue-on-error: true
modules:
needs: [pre_job, changed_files]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
container:
image: "claranet/terraform-ci:latest"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate modules doc
run: |
echo "${{needs.changed_files.outputs.modules_readme}}"
echo -n "${{needs.changed_files.outputs.modules_readme}}" | while read -d ',' dir; do
echo "process $(dirname ${dir}).."
make update-module-readme "$(basename $(dirname ${dir}))"
done
make update-toc
- name: Check for changes
run: git diff --exit-code
severity:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
container:
image: "claranet/terraform-ci:latest"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate severity doc
run: make update-severity-doc
- name: Check for changes
run: git diff --exit-code
spell_check:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run PySpelling
uses: rojopolis/spellcheck-github-actions@0.35.0
dead_links:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check dead links in Markdown
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: yes
use-verbose-mode: yes
check-modified-files-only: yes
config-file: .mlc_config.json