Skip to content

Build and update hash #1149

Build and update hash

Build and update hash #1149

Workflow file for this run

name: "Build and update hash"
on:
# push:
# branches:
# - master
workflow_dispatch:
schedule:
- cron: "39 3,11,19 * * *" # same in UTC and UTC+8
jobs:
build:
strategy:
matrix:
runner: [ubuntu-latest]
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io https://cache.nixos.org/
- uses: cachix/cachix-action@v15
with:
name: aur3l14no
- name: Configure user and email
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update flakes
run: |
nix flake update
(git add -u && git commit -m 'Bump inputs') || true
- name: Build and commit
run: |
nix develop -c scripts/update_singbox.py
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push, but okay to fail
run: git push || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}