From 940debedc3bf379c372ddd316b62d526d8b78233 Mon Sep 17 00:00:00 2001 From: Javid Ahmed Date: Fri, 6 Mar 2026 22:10:59 +0000 Subject: [PATCH] Refactor conditional syntax in workflow files to remove unnecessary brackets --- .github/workflows/build.yml | 8 ++++---- .github/workflows/ci.yml | 28 ++++++++++++++-------------- .github/workflows/docker.yml | 24 ++++++++++++------------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5fb4e9..536d9de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,9 +14,9 @@ jobs: steps: - uses: actions/checkout@v6 - uses: ./.github/actions/build/build-wheel - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/build/build-wheel@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' verify-structure: runs-on: ubuntu-latest @@ -24,6 +24,6 @@ jobs: steps: - uses: actions/checkout@v6 - uses: ./.github/actions/build/verify-structure - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/build/verify-structure@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f368253..c61f9e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,60 +14,60 @@ jobs: steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/validate-pyproject - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/validate-pyproject@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' ruff: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/ruff - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/ruff@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' mypy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/mypy - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/mypy@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' pytest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/pytest - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/pytest@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' bandit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/bandit - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/bandit@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' pip-audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/pip-audit - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/pip-audit@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' version-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/ci/version-check - if: ${{ github.event.repository.name == 'template-python' }} + if: github.event.repository.name == 'template-python' - uses: javidahmed64592/template-python/.github/actions/ci/version-check@main - if: ${{ github.event.repository.name != 'template-python' }} + if: github.event.repository.name != 'template-python' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 621470a..26fe876 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,28 +17,28 @@ jobs: - uses: actions/checkout@v6 - uses: ./.github/actions/docker/build-start-services - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' - uses: javidahmed64592/python-template-server/.github/actions/docker/build-start-services@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' - uses: ./.github/actions/docker/show-logs - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' - uses: javidahmed64592/python-template-server/.github/actions/docker/show-logs@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' - uses: ./.github/actions/docker/check-containers - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' with: port: 443 - uses: javidahmed64592/python-template-server/.github/actions/docker/check-containers@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' with: port: 443 - uses: ./.github/actions/docker/stop-services - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' - uses: javidahmed64592/python-template-server/.github/actions/docker/stop-services@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' prepare-release: runs-on: ubuntu-latest @@ -49,9 +49,9 @@ jobs: - uses: javidahmed64592/template-python/.github/actions/setup/install-python-dev@main - uses: ./.github/actions/docker/prepare-release - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' - uses: javidahmed64592/python-template-server/.github/actions/docker/prepare-release@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' publish-release: runs-on: ubuntu-latest @@ -66,10 +66,10 @@ jobs: - uses: javidahmed64592/template-python/.github/actions/setup/install-python-core@main - uses: ./.github/actions/docker/check-repo-name - if: ${{ github.event.repository.name == 'python-template-server' }} + if: github.event.repository.name == 'python-template-server' id: check_repo_name_local - uses: javidahmed64592/python-template-server/.github/actions/docker/check-repo-name@main - if: ${{ github.event.repository.name != 'python-template-server' }} + if: github.event.repository.name != 'python-template-server' id: check_repo_name_remote - id: check_repo_name run: echo "should_release=${{ steps.check_repo_name_local.outputs.should_release || steps.check_repo_name_remote.outputs.should_release }}" >> $GITHUB_OUTPUT