Dependency graphs
Install fpm-deps or fpm-modules on Linux,
generate a package or Fortran module dependency graph and update the
selected README through a pull request.
Inputs
| Input | Default | Value |
|---|---|---|
update-readme-dependencies |
false |
false, fpm-deps or
fpm-modules
|
dependency-graph-working-directory |
. |
Project directory |
dependency-graph-readme-file |
README.md |
README file relative to the repository root |
dependency-graph-options |
empty | Additional generator options |
update-readme-user-name |
empty | Required Git author name |
update-readme-user-email |
empty | Required Git author email |
update-readme-token |
empty | Required token for the pull request |
Permissions
Dependency graph generation reads Actions job metadata. Updating the
selected README writes a branch and creates or updates a pull
request. The token supplied through
update-readme-token requires repository contents and
pull-request write access.
permissions:
actions: read
contents: write
pull-requests: write
When github.token is supplied, the repository must also
allow GitHub Actions to create pull requests.
fpm package graph
The action installs
fpm-deps.
fpm and git are already available.
update_readme_fpm_deps:
name: Update README fpm dependency graph
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
pull-requests: write
steps:
- name: Update fpm dependency graph
uses: gha3mi/setup-fortran-conda@latest
with:
update-readme-dependencies: fpm-deps
dependency-graph-working-directory: .
dependency-graph-readme-file: README.md
update-readme-token: ${{ secrets.GH_PAT }}
update-readme-user-name: "Your Name"
update-readme-user-email: "you@example.com"
Fortran module graph
The action installs
fpm-modules.
fpm and git are already available.
update_readme_fpm_modules:
name: Update README module dependency graph
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
pull-requests: write
steps:
- name: Update module dependency graph
uses: gha3mi/setup-fortran-conda@latest
with:
update-readme-dependencies: fpm-modules
dependency-graph-working-directory: .
dependency-graph-readme-file: README.md
dependency-graph-options: "-x fpm,daglib"
update-readme-token: ${{ secrets.GH_PAT }}
update-readme-user-name: "Your Name"
update-readme-user-email: "you@example.com"
README markers
Add the matching marker pair to README.md; the selected
dependency graph is inserted between them.
fpm package graph
<!-- FPM-DEPS:setup-fortran-conda:START -->
<!-- FPM-DEPS:setup-fortran-conda:END -->
Fortran module graph
<!-- FPM-MODULES:setup-fortran-conda:START -->
<!-- FPM-MODULES:setup-fortran-conda:END -->