Skip to content

Commit 56868ae

Browse files
committed
feat: new README table
1 parent 2dcd25e commit 56868ae

File tree

4 files changed

+404
-53
lines changed

4 files changed

+404
-53
lines changed

.github/workflows/CI-CD.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Setup Fortran
41-
uses: gha3mi/setup-fortran-conda@latest
41+
uses: gha3mi/setup-fortran-conda@dev
4242
with:
4343
compiler: ${{ matrix.compiler }}
4444
compiler-version: ${{ matrix.compiler-version }}
@@ -64,7 +64,7 @@ jobs:
6464

6565
steps:
6666
- name: Setup Fortran
67-
uses: gha3mi/setup-fortran-conda@latest
67+
uses: gha3mi/setup-fortran-conda@dev
6868
with:
6969
compiler: ${{ matrix.compiler }}
7070
compiler-version: ${{ matrix.compiler-version }}
@@ -98,7 +98,7 @@ jobs:
9898

9999
steps:
100100
- name: Setup Fortran
101-
uses: gha3mi/setup-fortran-conda@latest
101+
uses: gha3mi/setup-fortran-conda@dev
102102
with:
103103
compiler: ${{ matrix.compiler }}
104104
compiler-version: ${{ matrix.compiler-version }}
@@ -135,7 +135,7 @@ jobs:
135135

136136
steps:
137137
- name: Setup Fortran
138-
uses: gha3mi/setup-fortran-conda@latest
138+
uses: gha3mi/setup-fortran-conda@dev
139139
with:
140140
compiler: ${{ matrix.compiler }}
141141
compiler-version: ${{ matrix.compiler-version }}
@@ -159,7 +159,7 @@ jobs:
159159
runs-on: ubuntu-latest
160160
steps:
161161
- name: Setup and Generate FORD Documentation
162-
uses: gha3mi/setup-fortran-conda@latest
162+
uses: gha3mi/setup-fortran-conda@dev
163163
with:
164164
compiler: gfortran
165165
generate-doc-ford: true
@@ -175,7 +175,7 @@ jobs:
175175
runs-on: ubuntu-latest
176176
steps:
177177
- name: Setup and Generate Doxygen Documentation
178-
uses: gha3mi/setup-fortran-conda@latest
178+
uses: gha3mi/setup-fortran-conda@dev
179179
with:
180180
compiler: gfortran
181181
generate-doc-doxygen: true
@@ -192,7 +192,7 @@ jobs:
192192
runs-on: ubuntu-latest
193193
steps:
194194
- name: Generate summary
195-
uses: gha3mi/setup-fortran-conda@latest
195+
uses: gha3mi/setup-fortran-conda@dev
196196
with:
197197
generate-status-fpm: true
198198

@@ -203,7 +203,7 @@ jobs:
203203
runs-on: ubuntu-latest
204204
steps:
205205
- name: Generate summary
206-
uses: gha3mi/setup-fortran-conda@latest
206+
uses: gha3mi/setup-fortran-conda@dev
207207
with:
208208
generate-status-cmake: true
209209

@@ -214,18 +214,18 @@ jobs:
214214
runs-on: ubuntu-latest
215215
steps:
216216
- name: Generate summary
217-
uses: gha3mi/setup-fortran-conda@latest
217+
uses: gha3mi/setup-fortran-conda@dev
218218
with:
219219
generate-status-meson: true
220220

221221
update_readme_table:
222-
if: ${{ always() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }}
222+
if: ${{ always() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && !contains(github.event.head_commit.message, '[skip ci]') }}
223223
name: Update README.md status table
224224
needs: [status_fpm, status_cmake, status_meson]
225225
runs-on: ubuntu-latest
226226
steps:
227227
- name: Update README status
228-
uses: gha3mi/setup-fortran-conda@latest
228+
uses: gha3mi/setup-fortran-conda@dev
229229
with:
230230
update-readme-table: true
231231
update-readme-token: ${{ secrets.GH_PAT }} # Update with your GitHub personal access token
@@ -238,7 +238,7 @@ jobs:
238238
runs-on: ubuntu-latest
239239
steps:
240240
- name: Run Fortitude Linter
241-
uses: gha3mi/setup-fortran-conda@latest
241+
uses: gha3mi/setup-fortran-conda@dev
242242
with:
243243
fortitude-check: true
244244
fortitude-settings: "--output-format github"

action.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,26 @@ runs:
146146
channels: conda-forge, defaults
147147

148148
- name: Run Fortran compiler setup script
149+
id: setup_fortran
149150
if: ${{ inputs.compiler != '' }}
150151
shell: bash
151152
run: |
152153
node "${{ github.action_path }}/index.js"
153154
env:
154155
INPUT_COMPILER: ${{ inputs.compiler }}
155156
INPUT_COMPILER_VERSION: ${{ inputs.compiler-version }}
156-
INPUT_PLATFORM: ${{ runner.os }}
157+
INPUT_PLATFORM: ${{ inputs.platform != '' && inputs.platform || runner.os }}
157158
INPUT_EXTRA_PACKAGES: ${{ inputs.extra-packages }}
158159
INPUT_FPM_VERSION: ${{ inputs.fpm-version }}
160+
GITHUB_TOKEN: ${{ github.token }}
161+
162+
- name: Upload setup-fortran-conda metadata
163+
if: ${{ always() && inputs.compiler != '' }}
164+
uses: actions/upload-artifact@v4
165+
with:
166+
name: ${{ steps.setup_fortran.outputs.metadata-artifact-name }}
167+
path: ${{ steps.setup_fortran.outputs.metadata-path }}
168+
retention-days: 7
159169

160170
- name: Install and Run Fortitude Linter
161171
if: ${{ inputs.fortitude-check == 'true' }}
@@ -275,23 +285,37 @@ runs:
275285
clean: true
276286
commit-message: "Deploy meson status"
277287

278-
- name: Generate and Inject CI Matrix into README
279-
if: ${{ inputs.generate-status-table == 'true' }}
280-
shell: bash
281-
run: |
282-
bash "${{ github.action_path }}/scripts/update-readme-status.sh"
283-
284288
- name: Checkout repository (for README update)
285289
if: ${{ inputs.update-readme-table == 'true' }}
286290
uses: actions/checkout@v6.0.2
287291
with:
288292
persist-credentials: false
289293

294+
- name: Download setup-fortran-conda metadata artifacts
295+
if: ${{ inputs.generate-status-table == 'true' || inputs.update-readme-table == 'true' }}
296+
uses: actions/download-artifact@v4
297+
with:
298+
pattern: setup-fortran-conda-meta-*
299+
path: .setup-fortran-conda-meta
300+
merge-multiple: true
301+
302+
- name: Generate and Inject CI Matrix into README (metadata-based)
303+
if: ${{ inputs.generate-status-table == 'true' }}
304+
shell: bash
305+
run: node "${{ github.action_path }}/scripts/update-readme-matrix-table.js"
306+
env:
307+
GITHUB_TOKEN: ${{ github.token }}
308+
SETUP_FORTRAN_CONDA_META_DIR: .setup-fortran-conda-meta
309+
README_FILE: README.md
310+
290311
- name: Generate status table in README
291312
if: ${{ inputs.update-readme-table == 'true' }}
292313
shell: bash
293-
run: |
294-
bash "${{ github.action_path }}/scripts/update-readme-status.sh"
314+
run: node "${{ github.action_path }}/scripts/update-readme-matrix-table.js"
315+
env:
316+
GITHUB_TOKEN: ${{ github.token }}
317+
SETUP_FORTRAN_CONDA_META_DIR: .setup-fortran-conda-meta
318+
README_FILE: README.md
295319

296320
- name: Setup Git author
297321
if: ${{ inputs.update-readme-table == 'true' }}

0 commit comments

Comments
 (0)