build(deps): bump time from 0.3.44 to 0.3.47 #117
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check / Docs Updated | |
| on: | |
| workflow_call: | |
| push: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/check-docs-updated.yml | |
| - .github/actions/setup-nix/action.yml | |
| - .cargo/config.toml | |
| - Cargo.toml | |
| - Cargo.lock | |
| - Makefile.toml | |
| - rust-toolchain.toml | |
| - flake.nix | |
| - flake.lock | |
| - contracts/**/*.rs | |
| - contracts/**/Cargo.toml | |
| - contracts/**/Makefile.toml | |
| - contracts/**/metadata.json | |
| - packages/**/*.rs | |
| - packages/**/Cargo.toml | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/check-docs-updated.yml | |
| - .github/actions/setup-nix/action.yml | |
| - .cargo/config.toml | |
| - Cargo.toml | |
| - Cargo.lock | |
| - Makefile.toml | |
| - rust-toolchain.toml | |
| - flake.nix | |
| - flake.lock | |
| - contracts/**/*.rs | |
| - contracts/**/Cargo.toml | |
| - contracts/**/Makefile.toml | |
| - contracts/**/metadata.json | |
| - packages/**/*.rs | |
| - packages/**/Cargo.toml | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: check-docs-updated-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-docs-updated: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Cache cargo registry | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ~/.cargo/bin | |
| ~/.rustup | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Setup Nix | |
| uses: ./.github/actions/setup-nix | |
| - name: Generate schema | |
| run: nix develop -c cargo make schema | |
| - name: Generate documentations | |
| run: nix develop -c cargo make docs | |
| - name: Verify changed docs files | |
| id: verify-changed-docs-files | |
| uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20 | |
| with: | |
| files: | | |
| docs/*.md | |
| - name: Run step only when files change. | |
| if: steps.verify-changed-docs-files.outputs.files_changed == 'true' | |
| run: | | |
| echo "β Documentation files have been updated." | |
| echo " Changed files : ${{ steps.verify-changed-docs-files.outputs.changed_files }}" | |
| git diff --name-only | grep 'docs/' | while read -r file; do | |
| echo "β£ Changes in $file:" | |
| git diff HEAD "$file" | |
| done | |
| echo "Please generate docs using \`cargo make docs\` then commit this new documentation." | |
| exit 1 |