diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffcaf01c..55ebb81e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,11 @@ on: branches: [master, develop, release/**] pull_request: types: [opened, synchronize, reopened] + workflow_dispatch: + inputs: + triggeredBy: + description: 'Name of team member who is manually triggering this workflow' + required: true defaults: run: @@ -21,12 +26,17 @@ jobs: strategy: matrix: - os: [ubuntu-20.04, macos-12, windows-2022] - python: ['3.7'] + os: [ubuntu-22.04, macos-12, windows-2022] + python: ['3.7', '3.8', '3.9', '3.10'] runs-on: ${{ matrix.os }} steps: + + - run: | + echo "This workflow was triggered by: $TRIGGER_PERSON" + env: + TRIGGER_PERSON: ${{ inputs.triggeredBy }} - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." @@ -34,10 +44,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python }} # https://github.com/pre-commit/action - name: Run pre-commit hooks diff --git a/README.md b/README.md index 79a39b40..e78660f5 100644 --- a/README.md +++ b/README.md @@ -232,3 +232,23 @@ License ------- Released under the 3-Clause BSD license (see License.rst) + + +Continuous Integration/Continuous Deployment +-------------------------------------------- + +This project runs Continuous Integration (CI) using GitHub Actions. Normally, CI runs +on pull requests, pushes to certain branches, and other events. + +Maintainers of the GitHub repository can manually trigger CI using [GitHub CLI](https://cli.github.com/). See instructions below on how to manually trigger CI on GitHub Actions: + +```commandline +# login to Github +gh auth login --with-token < ~/.ssh/tokens/ + +# Trigger CI +gh workflow run ci.yml --repo pnnl/HyperNetX --ref --field triggeredBy="" + +# Get the status of the workflow +gh run list --workflow=ci.yml --repo pnnl/HyperNetX +```