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

Fix CI errors - slash in branch name and Python version #1983

Merged
merged 3 commits into from
Dec 9, 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: 6 additions & 3 deletions .github/jobs/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,21 @@ def get_branch_name():
# get branch name from env var BRANCH_NAME
branch_name = os.environ.get('BRANCH_NAME')
if branch_name:
return branch_name
return branch_name.replace('/', '_')

# if BRANCH_NAME not set, use GITHUB env vars
github_event_name = os.environ.get('GITHUB_EVENT_NAME')
if not github_event_name:
return None

if github_event_name == 'pull_request':
return os.environ.get('GITHUB_HEAD_REF')
branch_name = os.environ.get('GITHUB_HEAD_REF')
if branch_name:
branch_name = branch_name.replace('/', '_')
return branch_name

github_ref = os.environ.get('GITHUB_REF')
if github_ref is None:
return None

return github_ref.replace('refs/heads/', '')
return github_ref.replace('refs/heads/', '').replace('/', '_')
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
push:
branches:
- develop
- feature_*
- main_*
- bugfix_*
- feature_**
- main_**
- bugfix_**
paths:
- docs/**
pull_request:
Expand All @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade sphinx sphinx-gallery sphinx_rtd_theme
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
branches:
- develop
- develop-ref
- 'feature_*'
- 'main_*'
- 'bugfix_*'
- 'feature_**'
- 'main_**'
- 'bugfix_**'
paths-ignore:
- 'docs/**'

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: '3.8'
- name: Get METplus Image
run: .github/jobs/docker_setup.sh
env:
Expand Down