Bump all packages #533
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump all packages | |
on: | |
workflow_dispatch: | |
inputs: | |
bumpNumber: | |
description: Increase for each bump in the same day | |
required: false | |
type: number | |
kissMeKissMeKissMe: | |
description: Don't build, don't revert, don't cache | |
required: true | |
default: false | |
type: boolean | |
permissions: | |
contents: write | |
pull-requests: write | |
# It's better for it to conflict with other builds and bumps | |
concurrency: | |
group: nyx-main-build | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: nyxbuilder | |
timeout-minutes: 1440 | |
steps: | |
# identical to build.yml | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
with: | |
extra_nix_config: | | |
accept-flake-config = true | |
sandbox-fallback = false | |
system-features = big-parallel gccarch-x86-64-v3 | |
install_options: --daemon | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure sandboxing | |
run: | | |
sed -i -e '/^build-users-group =/d' -e 's/max-jobs =.*/max-jobs = 8/g' /etc/nix/nix.conf | |
nix eval ./maintenance#_dev.nixConfig --json | jq -r 'to_entries[] | "\(.key) = \(.value | join(" "))"' >> /etc/nix/nix.conf | |
# config to commit | |
- name: Bat-signal | |
run: | | |
set -e | |
git config --global user.name 'Chaotic Github Actions' | |
git config --global user.email '[email protected]' | |
# the bump itself | |
- name: Wiggle, wiggle, wiggle | |
id: build | |
run: | | |
[ "$NO_REVERT" == 'true' ] && export NYX_BUMP_REVERT=0 | |
nix develop --impure ./maintenance#updater -c 'chaotic-nyx-bumper' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
NYX_BUMPN: ${{ inputs.bumpNumber }} | |
NO_REVERT: ${{ inputs.kissMeKissMeKissMe }} | |
# similar to build.yml | |
- name: Download cache list | |
run: | | |
curl -vfo "${{ runner.temp }}/prev-cache.json" -H "Authorization: Bearer ${{ secrets.CACHIX_AUTH_TOKEN_SUPREME }}" \ | |
'https://app.cachix.org/api/v1/cache/chaotic-nyx/contents' | |
# similar to build.yml | |
- name: Cache | |
id: cache | |
if: (success() && inputs.kissMeKissMeKissMe != 'true') | |
run: nix develop ./maintenance -c chaotic-nyx-build || [ $? -eq 42 ] | |
env: | |
NYX_WD: ${{ runner.temp }} | |
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} |