Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update concurrency, permissions and actions #313

Merged
merged 3 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/docs-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ on:
pull_request:
branches: [ master, 'maint/*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
if: "(github.repository_owner != 'nipreps') && !contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docs-build-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ on:
branches: [ 'doc/*', 'docs/*', master, "maint/*" ]
tags: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ssh-key: "${{ secrets.NIPREPS_DEPLOY }}"
fetch-depth: 0
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
pull_request:
branches: [ master, 'maint/*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
if: "!startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip ci]')"
Expand All @@ -20,15 +27,15 @@ jobs:
pip: ["pip==21.2", "pip~=22.0"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Fetch all tags (for setuptools_scm to work)
run: |
/usr/bin/git -c protocol.version=2 fetch --tags --prune --unshallow origin
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: $HOME/.cache/pip
key: pip-cache-v1
Expand Down Expand Up @@ -86,10 +93,10 @@ jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3
- run: pip install flake8
- run: flake8 sdcflows/
11 changes: 9 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
schedule:
- cron: 0 0 * * 0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build-linux:
if: "!contains(github.event.head_commit.message, '[skip ci]' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'nipreps/sdcflows'))"
Expand Down Expand Up @@ -81,7 +88,7 @@ jobs:
git config --global user.name 'NiPreps Bot'
git config --global user.email 'nipreps@gmail.com'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
Expand All @@ -97,7 +104,7 @@ jobs:
run: |
$CONDA/bin/conda install -c conda-forge git-annex datalad pip
$CONDA/bin/pip install datalad-osf
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install minimal dependencies
timeout-minutes: 5
run: |
Expand Down