Skip to content

Commit fe73b79

Browse files
Update env vars (#28)
* Add action to set PACKAGE_NAME environment variable in workflows * Add action to set PACKAGE_NAME environment variable in workflows * Refactor repository checks to use github.event.repository.name for consistency across workflows and actions
1 parent 08e3b61 commit fe73b79

15 files changed

Lines changed: 81 additions & 52 deletions

File tree

.github/actions/build/build-wheel/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-core
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-core@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Create wheel
1414
run: |

.github/actions/build/verify-structure/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-core
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-core@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Download wheel artifact
1414
uses: actions/download-artifact@v7

.github/actions/ci/bandit/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Security check
1414
run: |

.github/actions/ci/mypy/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Check with mypy
1414
run: |

.github/actions/ci/pip-audit/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Audit dependencies
1414
run: |

.github/actions/ci/pytest/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Test with pytest
1414
run: |

.github/actions/ci/ruff/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Check with ruff
1414
run: |

.github/actions/ci/validate-pyproject/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/install-python-dev
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Validate pyproject.toml
1414
run: |

.github/actions/ci/version-check/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ runs:
1212
steps:
1313
- uses: actions/checkout@v6
1414
- uses: ./.github/actions/setup/install-python-dev
15-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
15+
if: ${{ github.event.repository.name == 'template-python' }}
1616
- uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main
17-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
17+
if: ${{ github.event.repository.name != 'template-python' }}
1818

1919
- name: Check version consistency
2020
run: |

.github/actions/setup/install-python-core/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
steps:
77
- uses: actions/checkout@v6
88
- uses: ./.github/actions/setup/setup-uv-python
9-
if: ${{ github.repository == 'javidahmed64592/template-python' }}
9+
if: ${{ github.event.repository.name == 'template-python' }}
1010
- uses: javidahmed64592/template-python/.github/actions/setup/setup-uv-python@main
11-
if: ${{ github.repository != 'javidahmed64592/template-python' }}
11+
if: ${{ github.event.repository.name != 'template-python' }}
1212

1313
- name: Install dependencies
1414
run: |

0 commit comments

Comments
 (0)