Use GitHub variable to define OFT file patterns #24
Workflow file for this run
This file contains 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
# ******************************************************************************** | |
# Copyright (c) 2024 Contributors to the Eclipse Foundation | |
# | |
# See the NOTICE file(s) distributed with this work for additional | |
# information regarding copyright ownership. | |
# | |
# This program and the accompanying materials are made available under the | |
# terms of the Apache License Version 2.0 which is available at | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# *******************************************************************************/ | |
# Perform requirements tracing against the uProtocol Specification using OpenFastTrace (https://github.com/itsallcode/openfasttrace) | |
# Upload tracing report for potential re-use in publication workflow, returns the corresponding download URL as an output on workflow_call | |
name: Requirements tracing | |
on: | |
workflow_call: | |
inputs: | |
oft-file-patterns: | |
description: | | |
A whitespace separated list of glob patterns which specify the files to include in the OFT trace run. | |
If not specified, defaults to the value of the `UP_SPEC_OPEN_FAST_TRACE_FILE_PATTERNS` variable. | |
If that variable is empty, defaults to the _run-oft_ Action's default file pattern(s). | |
type: string | |
outputs: | |
tracing_report_url: | |
description: | | |
URL of the requirements tracing report. | |
value: ${{ jobs.tracing.outputs.requirements-tracing-report-url }} | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
tracing: | |
name: Run OpenFastTrace | |
runs-on: ubuntu-latest | |
outputs: | |
requirements-tracing-report-url: ${{ steps.run-oft.outputs.requirements-tracing-report-url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Run OpenFastTrace | |
id: run-oft | |
uses: ./.github/actions/run-oft | |
with: | |
file-patterns: ${{ inputs.oft-file-patterns || vars.UP_SPEC_OPEN_FAST_TRACE_FILE_PATTERNS }} | |
- name: "Determine exit code" | |
run: | | |
exit ${{ steps.run-oft.outputs.requirements-tracing-exit-code }} |