Compare commits

...

14 Commits

2 changed files with 13 additions and 6 deletions

View File

@@ -12,7 +12,6 @@ on:
- "**/CHANGELOG.md" - "**/CHANGELOG.md"
pull_request: pull_request:
branches: branches:
- master
- dev - dev
workflow_dispatch: workflow_dispatch:
@@ -46,7 +45,7 @@ jobs:
tag_and_publish: tag_and_publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.head_ref == 'master' || github.head_ref == 'dev' if: github.ref_name == 'master' || github.ref_name == 'dev'
needs: test needs: test
permissions: permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
@@ -56,7 +55,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-tags: true fetch-tags: true
ref: ${{ github.head_ref }} ref: ${{ github.ref_name }}
fetch-depth: 0 fetch-depth: 0
- name: setup git - name: setup git
@@ -67,7 +66,7 @@ jobs:
- name: set version format - name: set version format
id: version_format id: version_format
run: | run: |
if [[ ${{ github.head_ref }} == 'master' ]]; then if [[ ${{ github.ref_name }} == 'master' ]]; then
echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT
else else
echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT
@@ -84,11 +83,19 @@ jobs:
version_format: ${{ steps.version_format.outputs.version_format }} version_format: ${{ steps.version_format.outputs.version_format }}
- name: Create & Push Tag - name: Create & Push Tag
if: github.head_ref == 'master' || github.head_ref == 'dev'
run: | run: |
git tag ${{ steps.git_version.outputs.version }} git tag ${{ steps.git_version.outputs.version }}
git push origin ${{ steps.git_version.outputs.version }} git push origin ${{ steps.git_version.outputs.version }}
- name: Sync tag to dev branch
if: github.ref == 'master'
run: |
git fetch origin dev
git checkout dev
git merge --no-ff ${{ steps.git_version.outputs.version }}
git push origin dev
git checkout master
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:

View File

@@ -107,7 +107,7 @@ def paginate(
count_query = create_count_query(query) count_query = create_count_query(query)
total = connection.scalar(count_query) total = connection.scalar(count_query)
if paginationFlag is False: if paginationFlag is False and total > 0:
params = Params(page=1, size=total) params = Params(page=1, size=total)
query = create_paginate_query(query, params) query = create_paginate_query(query, params)