Skip to content

️️⚡️ BUMP ⚡️ cron.yml 1(+) 1(-) #48

️️⚡️ BUMP ⚡️ cron.yml 1(+) 1(-)

️️⚡️ BUMP ⚡️ cron.yml 1(+) 1(-) #48

Workflow file for this run

# eslint-disable yml/no-empty-mapping-value
name: Cron
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: Enable debugging
required: false
default: false
push:
branches:
- main
- 'feature/**'
pull_request:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# schedule:
# - cron: '*/5 * * * *'
jobs:
# Job ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
build:
name: job ❯ build & run
runs-on: ubuntu-24.04
steps:
- name: Create Ramdrive
run: |
sudo mv /home/runner/work /home/runner/_work
mkdir -p /home/runner/work
sudo mount -o size=6G -t tmpfs none /home/runner/work
sudo rsync -av /home/runner/_work/ /home/runner/work
find . /home/runner/work
# - name: Benchmark1
# run: |
# sudo mkdir -p /mnt/tmpfs;
# sudo mount -o size=6G -t tmpfs none /mnt/tmpfs
# cd /mnt/tmpfs && curl -sL yabs.sh | bash -s -- -i -g
# ─────────────────────────────────────────────────────
- name: Bootstrap > Optimize fsync
run: |
echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so" >> $GITHUB_ENV
echo 'force-unsafe-io' | sudo tee -a /etc/dpkg/dpkg.cfg > /dev/null
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/dpkg $@' | sudo tee /usr/local/bin/dpkg && sudo chmod +x /usr/local/bin/dpkg
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/apt $@' | sudo tee /usr/local/bin/apt && sudo chmod +x /usr/local/bin/apt
echo -e '#!/bin/sh\nexec eatmydata /usr/bin/apt-get $@' | sudo tee /usr/local/bin/apt-get && sudo chmod +x /usr/local/bin/apt-get
# ─────────────────────────────────────────────────────
- name: Bootstrap ❯❯ actions/checkout@v4
uses: actions/checkout@v4
with:
fetch-depth: 1
# ─────────────────────────────────────────────────────
# - name: Bootstrap ❯❯ denoland/setup-deno@v1
# uses: denoland/setup-deno@v1
# with:
# deno-version: v1.x
# ─────────────────────────────────────────────────────
- name: Bootstrap ❯❯ Set env variables
run: |
echo TEST_SECRET="${{ secrets.TEST_SECRET }}" >> $GITHUB_ENV
.github/scripts/ciutil set-env-variables
# ─────────────────────────────────────────────────────
- uses: actions/cache@v4
name: Bootstrap ❯❯ Restore Lockfile Cache
with:
path: ${{ env.ACTIONS_CACHE_DIR }}
key: ${{ runner.os }}-v1-store-${{ env.CACHE_PREFIX_DAILY }}-${{ hashFiles('**/deno.lock') }}
restore-keys: |
${{ runner.os }}-v1-store-${{ env.CACHE_PREFIX_DAILY }}-${{ hashFiles('**/deno.lock') }}
# ${{ runner.os }}-v1-store-${{ env.CACHE_PREFIX_DAILY }}-
# ${{ runner.os }}-v1-store-
- uses: actions/cache@v4
name: Bootstrap ❯❯ Restore TTL Cache
if: always()
with:
path: ${{ env.TTL_CACHE_DIR }}
key: ${{ runner.os }}-v1-ttl-cache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
${{ runner.os }}-v1-ttl-cache-${{ env.CACHE_PREFIX }}-
${{ runner.os }}-v1-ttl-cache-
# - uses: actions/cache@v4
# name: Bootstrap ❯❯ Restore Files Cache
# if: always()
# with:
# path: ${{ env.FILES_CACHE_DIR }}
# key: ${{ runner.os }}-v3-files-cache-${{ env.CACHE_PREFIX_DAILY }}-${{ hashFiles('**/package.json') }}
# restore-keys: |
# ${{ runner.os }}-v3-files-cache-${{ env.CACHE_PREFIX_DAILY }}-${{ hashFiles('**/package.json') }}
# ${{ runner.os }}-v3-files-cache-${{ env.CACHE_PREFIX_DAILY }}-
# ─────────────────────────────────────────────────────
- name: Bootstrap ❯❯ Preinstall & Prepare Environment
run: |
. .github/scripts/ciutil
✨ "Setup: Preinstall binaries" && preinstall-binaries
✨ "Debug: System information" && fastfetch --logo none --structure Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:CPU:GPU:Memory:Disk:Battery:PowerAdapter:Break:LocalIP:PublicIP --publicip-url icanhazip.com --publicip-timeout 200 || true
✨ "Debug: Env variables" && ga-dump-env
✨ "Debug: generic cache ($ACTIONS_CACHE_DIR)" && show-cache-structure-default
✨ "Debug: ttl cache ($TTL_CACHE_DIR)" && show-cache-structure-ttl
✨ "Debug: file cache ($FILES_CACHE_DIR)" && show-cache-structure-files
✨ "Debug: apt cache (/var/cache/apt/archives)" && show-cache-structure-apt
✨ "pnpm install" && install-nodemodules
✨ "Housekeeping:" && cron-housekeeping
# ─────────────────────────────────────────────────────
- uses: actions/checkout@v4
- name: Setup tmate session
if: ${{ runner.debug == '1' }}
uses: mxschmitt/action-tmate@v3
with:
detached: false
# ─────────────────────────────────────────────────────
- name: "✨ Docker ❯❯ Job1"
# if: github.event.schedule != '*/5 * * * *'
run: |
docker run hello-world
# ─────────────────────────────────────────────────────
- name: "✨ Cron ❯❯ Job1"
# if: github.event.schedule != '*/5 * * * *'
run: |
cd .cron && just
# ─────────────────────────────────────────────────────
- name: Post hooks ❯❯ Commit to repository
if: github.ref == 'refs/heads/main'
run: |
.github/scripts/ciutil git-commit-to-repository
git push
# ─────────────────────────────────────────────────────
- name: "Debug ❯❯ Context Information"
id: github_context_step
env:
JSON_GITHUB: ${{ toJSON(github) }}
JSON_JOB: ${{ toJSON(job) }}
JSON_STEPS: ${{ toJSON(steps) }}
JSON_RUNNER: ${{ toJSON(runner) }}
JSON_STRATEGY: ${{ toJSON(strategy) }}
JSON_MATRIX: ${{ toJSON(MATRIX) }}
run: |
. .github/scripts/ciutil
ip-public
✨ "Debug: generic cache ($ACTIONS_CACHE_DIR)" && show-cache-structure-default
✨ "Debug: ttl cache ($TTL_CACHE_DIR)" && show-cache-structure-ttl
✨ "Debug: file cache ($FILES_CACHE_DIR)" && show-cache-structure-files
___
ga-dump-context # | tee /tmp/ga-dump-context.txt &> /dev/null && cat /tmp/ga-dump-context.txt