fix(ci): use updated container for stats workflow
This commit is contained in:
1 parent
bf27846a2d
commit
17c2e27b84
1 file changed
+10
-10
@@ -9,6 +9,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
sync-stats:
|
sync-stats:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Manual Internal Checkout
|
- name: Manual Internal Checkout
|
||||||
run: |
|
run: |
|
||||||
@@ -20,18 +22,16 @@ jobs:
|
|||||||
git fetch origin
|
git fetch origin
|
||||||
git rebase origin/${{ github.ref_name }}
|
git rebase origin/${{ github.ref_name }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
env:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends jq python3
|
||||||
|
|
||||||
- name: Process Statistics and Update README
|
- name: Process Statistics and Update README
|
||||||
run: |
|
run: |
|
||||||
if ! command -v jq &> /dev/null; then
|
|
||||||
if command -v apk &> /dev/null; then apk add --no-cache jq;
|
|
||||||
elif command -v apt-get &> /dev/null; then apt-get update && apt-get install -y jq; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command -v python3 &> /dev/null; then
|
|
||||||
if command -v apk &> /dev/null; then apk add --no-cache python3;
|
|
||||||
elif command -v apt-get &> /dev/null; then apt-get update && apt-get install -y python3; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use our own heatmap.json instead of Gitea API
|
# Use our own heatmap.json instead of Gitea API
|
||||||
HEATMAP_FILE="public/heatmap.json"
|
HEATMAP_FILE="public/heatmap.json"
|
||||||
TOTAL_COMMITS=$(jq '[.days[] | .count] | add' "$HEATMAP_FILE")
|
TOTAL_COMMITS=$(jq '[.days[] | .count] | add' "$HEATMAP_FILE")
|
||||||
|
|||||||
Reference in new issue
Block a user