Compare commits
2 Commits
main
...
d4fc33c863
Author | SHA1 | Date | |
---|---|---|---|
d4fc33c863 | |||
f545b869f9 |
@@ -16,19 +16,6 @@ jobs:
|
|||||||
|
|
||||||
- uses: https://gitea.com/actions/checkout@v4
|
- uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Fetch tags from main branch
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
git fetch origin main --tags
|
|
||||||
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
|
||||||
# remove the 'v' prefix from the tag name
|
|
||||||
echo "BUILD_NAME=${LATEST_TAG//v}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Output the version that is being used
|
|
||||||
run: |
|
|
||||||
echo "Building for version ${{ steps.version.outputs.BUILD_NAME }}"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -36,15 +23,13 @@ jobs:
|
|||||||
username: ${{ gitea.repository_owner }}
|
username: ${{ gitea.repository_owner }}
|
||||||
password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }}
|
password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
# use the current commit SHA as the tag
|
# use the current commit SHA as the tag
|
||||||
tags: git.kluster.moll.re/remoll/journal-bot:${{ steps.version.outputs.BUILD_NAME }}-${{ gitea.run_number }}
|
tags: git.kluster.moll.re/remoll/journal-bot:${{ gitea.sha }}
|
||||||
push: true
|
push: true
|
||||||
|
@@ -49,11 +49,14 @@ class SendLeaderboard():
|
|||||||
else:
|
else:
|
||||||
# set the message sending time; include UTC shift +2
|
# set the message sending time; include UTC shift +2
|
||||||
sending_time = time(hour=12, minute=0, second=0, tzinfo=timezone(timedelta(hours=2)))
|
sending_time = time(hour=12, minute=0, second=0, tzinfo=timezone(timedelta(hours=2)))
|
||||||
job_queue.run_daily(self.callback_leaderboard, time=sending_time, days=(0,))
|
job_queue.run_daily(self.callback_leaderboard, when=sending_time, day=-1)
|
||||||
|
|
||||||
|
|
||||||
async def callback_leaderboard(self, context):
|
async def callback_leaderboard(self, context):
|
||||||
"""Send a weakly leaderboard to the chat."""
|
"""Send a weakly leaderboard to the chat."""
|
||||||
|
if date.today().weekday() != 1:
|
||||||
|
self.logger.info("Today is not Monday, skipping leaderboard.")
|
||||||
|
return
|
||||||
|
|
||||||
# get the top contributions of the past week, month and year:
|
# get the top contributions of the past week, month and year:
|
||||||
ranking_week = get_author_ranking(7)
|
ranking_week = get_author_ranking(7)
|
||||||
|
@@ -12,4 +12,4 @@ namespace: journal
|
|||||||
images:
|
images:
|
||||||
- name: journal
|
- name: journal
|
||||||
newName: git.kluster.moll.re/remoll/journal-bot
|
newName: git.kluster.moll.re/remoll/journal-bot
|
||||||
newTag: 1.1.0-17
|
newTag: 29d951427d6f3377e43767916cefb07e03e9eab8
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
"commitMessagePrefix": "[skip ci]",
|
"commitMessagePrefix": "[skip ci]",
|
||||||
"registryUrls": [
|
"registryUrls": [
|
||||||
"https://git.kluster.moll.re"
|
"https://git.kluster.moll.re"
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user