mirror of
https://github.com/11notes/docker-kms.git
synced 2025-10-23 04:52:15 +00:00
[feature] sql_get_all default sort by lastRequestTime DESC
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# default
|
||||
.git*
|
||||
*.md
|
||||
LICENSE
|
||||
img/
|
||||
maintain/
|
||||
project*
|
||||
LICENSE
|
||||
*.md
|
||||
img/
|
||||
node_modules/
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,2 +1 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
* text eol=lf
|
37
.github/workflows/docker.yml
vendored
37
.github/workflows/docker.yml
vendored
@@ -53,6 +53,7 @@ jobs:
|
||||
- name: init / checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.ref_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: init / inputs to env
|
||||
@@ -62,6 +63,7 @@ jobs:
|
||||
${{ toJSON(github.event.inputs) }}
|
||||
EOF
|
||||
for KEY in $(cat .inputs | jq --raw-output 'keys[]' | tr '\n' ' '); do echo "input_$(echo ${KEY} | tr '[:upper:]' '[:lower:]')=$(cat .inputs | jq --raw-output '.'${KEY}'')" >> $GITHUB_ENV; done
|
||||
rm -rf .inputs
|
||||
|
||||
- name: init / .json to env
|
||||
uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
|
||||
@@ -231,21 +233,10 @@ jobs:
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: github / update description and set repo defaults
|
||||
- name: github / checkout master
|
||||
continue-on-error: true
|
||||
run: |
|
||||
curl --request PATCH \
|
||||
--url https://api.github.com/repos/${{ github.repository }} \
|
||||
--header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"description":"${{ env.json_readme_description }}",
|
||||
"homepage":"",
|
||||
"has_issues":true,
|
||||
"has_discussions":true,
|
||||
"has_projects":false,
|
||||
"has_wiki":false
|
||||
}' \
|
||||
--fail
|
||||
git checkout master
|
||||
|
||||
- name: github / create README.md
|
||||
continue-on-error: true
|
||||
@@ -261,7 +252,7 @@ jobs:
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git add README.md
|
||||
git commit -m "auto update README.md"
|
||||
git push
|
||||
|
||||
@@ -276,3 +267,19 @@ jobs:
|
||||
provider: dockerhub
|
||||
short_description: ${{ env.json_readme_description }}
|
||||
readme_file: 'README.md'
|
||||
|
||||
- name: github / update description and set repo defaults
|
||||
run: |
|
||||
curl --request PATCH \
|
||||
--url https://api.github.com/repos/${{ github.repository }} \
|
||||
--header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
|
||||
--header 'content-type: application/json' \
|
||||
--data '{
|
||||
"description":"${{ env.json_readme_description }}",
|
||||
"homepage":"",
|
||||
"has_issues":true,
|
||||
"has_discussions":true,
|
||||
"has_projects":false,
|
||||
"has_wiki":false
|
||||
}' \
|
||||
--fail
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
# default
|
||||
maintain/
|
||||
node_modules/
|
@@ -55,7 +55,7 @@ def sql_get_all(dbName):
|
||||
return None
|
||||
with sqlite3.connect(dbName) as con:
|
||||
cur = con.cursor()
|
||||
cur.execute("SELECT * FROM clients")
|
||||
cur.execute("SELECT * FROM clients ORDER BY lastRequestTime DESC")
|
||||
clients = []
|
||||
for row in cur.fetchall():
|
||||
clients.append({
|
||||
|
Reference in New Issue
Block a user