diff --git a/.gitea/workflows/update-readme.yaml b/.gitea/workflows/update-readme.yaml index ebdc1fd..7de5c89 100644 --- a/.gitea/workflows/update-readme.yaml +++ b/.gitea/workflows/update-readme.yaml @@ -9,6 +9,8 @@ on: jobs: sync-stats: runs-on: ubuntu-latest + container: + image: ghcr.io/catthehacker/ubuntu:act-24.04 steps: - name: Manual Internal Checkout run: | @@ -20,18 +22,16 @@ jobs: git fetch origin 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 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 HEATMAP_FILE="public/heatmap.json" TOTAL_COMMITS=$(jq '[.days[] | .count] | add' "$HEATMAP_FILE")