README table
Aggregate compiler, MPI and build-tool metadata from matrix jobs into a CI table. Inject the table between README markers or create a pull request containing the update.
Inputs
| Input | Default | Value |
|---|---|---|
generate-status-table |
false |
Generate the README CI table |
update-readme-table |
false |
Update the README CI table through a pull request |
update-readme-user-name |
empty | Required Git author name for an update pull request |
update-readme-user-email |
empty | Required Git author email for an update pull request |
update-readme-token |
empty | Required token for an update pull request |
Permissions
Generating the table reads workflow jobs and checks out the repository.
permissions:
actions: read
contents: read
Updating the table through a pull request also writes a branch and
creates or updates the 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.
Job-name suffixes
The final underscore-separated segment of each tested job name
identifies the table column. Supported suffixes are
_fpm, _cmake and _meson.
test_fpm:
name: ${{ matrix.os }}_${{ matrix.compiler }}_fpm
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, compiler: gfortran}
test_mpi_cmake:
name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.mpi }}_cmake
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, compiler: gfortran, mpi: mpich}
test_mpi_meson:
name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.mpi }}_meson
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, compiler: gfortran, mpi: openmpi}
README markers
Add these markers to README.md; the generated CI table
is inserted between them.
<!-- STATUS:setup-fortran-conda:START -->
<!-- STATUS:setup-fortran-conda:END -->
Update through a pull request
update_readme_table:
if: ${{ always() }}
name: Update README.md status table
needs: [test_fpm, test_mpi_fpm, test_cmake, test_mpi_cmake, test_meson, test_mpi_meson]
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
pull-requests: write
steps:
- name: Update README status
uses: gha3mi/setup-fortran-conda@latest
with:
update-readme-table: true
update-readme-token: ${{ secrets.GH_PAT }}
update-readme-user-name: "Your Name"
update-readme-user-email: "you@example.com"