Skip to content

Commit d02b161

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

File tree

4 files changed

+468
-53
lines changed

4 files changed

+468
-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: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,34 @@ 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: >-
164+
${{
165+
always() &&
166+
inputs.compiler != '' &&
167+
inputs.fortitude-check != 'true' &&
168+
inputs.generate-doc-ford != 'true' &&
169+
inputs.generate-doc-doxygen != 'true' &&
170+
inputs.generate-status-table != 'true' &&
171+
inputs.update-readme-table != 'true'
172+
}}
173+
uses: actions/upload-artifact@v4
174+
with:
175+
name: ${{ steps.setup_fortran.outputs.metadata-artifact-name }}
176+
path: ${{ steps.setup_fortran.outputs.metadata-path }}
159177

160178
- name: Install and Run Fortitude Linter
161179
if: ${{ inputs.fortitude-check == 'true' }}
@@ -275,23 +293,37 @@ runs:
275293
clean: true
276294
commit-message: "Deploy meson status"
277295

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-
284296
- name: Checkout repository (for README update)
285297
if: ${{ inputs.update-readme-table == 'true' }}
286298
uses: actions/checkout@v6.0.2
287299
with:
288300
persist-credentials: false
289301

302+
- name: Download setup-fortran-conda metadata artifacts
303+
if: ${{ inputs.generate-status-table == 'true' || inputs.update-readme-table == 'true' }}
304+
uses: actions/download-artifact@v4
305+
with:
306+
pattern: setup-fortran-conda-meta-*
307+
path: ${{ runner.temp }}/setup-fortran-conda-meta
308+
merge-multiple: true
309+
310+
- name: Generate and Inject CI Matrix into README (metadata-based)
311+
if: ${{ inputs.generate-status-table == 'true' }}
312+
shell: bash
313+
run: node "${{ github.action_path }}/scripts/update-readme-matrix-table.js"
314+
env:
315+
GITHUB_TOKEN: ${{ github.token }}
316+
SETUP_FORTRAN_CONDA_META_DIR: ${{ runner.temp }}/setup-fortran-conda-meta
317+
README_FILE: README.md
318+
290319
- name: Generate status table in README
291320
if: ${{ inputs.update-readme-table == 'true' }}
292321
shell: bash
293-
run: |
294-
bash "${{ github.action_path }}/scripts/update-readme-status.sh"
322+
run: node "${{ github.action_path }}/scripts/update-readme-matrix-table.js"
323+
env:
324+
GITHUB_TOKEN: ${{ github.token }}
325+
SETUP_FORTRAN_CONDA_META_DIR: ${{ runner.temp }}/setup-fortran-conda-meta
326+
README_FILE: README.md
295327

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

0 commit comments

Comments
 (0)