mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
44 lines
1.7 KiB
YAML
44 lines
1.7 KiB
YAML
---
|
|
name: Update Nix dependency hashes
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "46 3 * * *"
|
|
|
|
jobs:
|
|
hashes:
|
|
name: Update dependency hashes
|
|
runs-on: ubuntu-latest
|
|
if: github.repository_owner == 'akvorado'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0 # All history needed
|
|
- name: Check for changes
|
|
id: check-changes
|
|
if: github.event_name == 'schedule'
|
|
run: |
|
|
LOCKFILES="go.sum console/frontend/pnpm-lock.yaml"
|
|
LAST_CHANGE=$(git log -1 --format=%ct -- $LOCKFILES)
|
|
CURRENT_TIME=$(date +%s)
|
|
ONE_HOUR_AGO=$((CURRENT_TIME - 3600))
|
|
LONG_TIME_AGO=$((CURRENT_TIME - 181440))
|
|
echo "Last change was $(( (CURRENT_TIME - LAST_CHANGE) / 60 )) minutes ago"
|
|
if [ "$LAST_CHANGE" -gt "$LONG_TIME_AGO" ] && [ "$LAST_CHANGE" -le "$ONE_HOUR_AGO" ]; then
|
|
echo "should_run=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_run=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
- uses: cachix/install-nix-action@v31
|
|
if: github.event_name != 'schedule' || steps.check-changes.outputs.should_run == 'true'
|
|
- name: Update dependency hashes
|
|
if: github.event_name != 'schedule' || steps.check-changes.outputs.should_run == 'true'
|
|
run: nix run .#update
|
|
- name: Push update
|
|
if: github.event_name != 'schedule' || steps.check-changes.outputs.should_run == 'true'
|
|
run: |
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add flake.lock nix
|
|
! git commit -m "build: update Nix dependency hashes" || git push
|