create flake update action #1
Workflow file for this run
This file contains hidden or 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: Update flake inputs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - action-test | |
| jobs: | |
| update-flake: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update flake inputs | |
| run: nix flake update | |
| - name: Attempt to build flake | |
| run: nix build | |
| - name: Test on Hyprland | |
| env: | |
| XDG_RUNTIME_DIR: /home/runner/runtime | |
| WLR_BACKENDS: headless | |
| WLR_LIBINPUT_NO_DEVICES: 1 | |
| WAYLAND_DISPLAY: wayland-1 | |
| GTK_USE_PORTAL: 0 | |
| run: | | |
| mkdir $XDG_RUNTIME_DIR | |
| chown $USER $XDG_RUNTIME_DIR | |
| chmod 0700 $XDG_RUNTIME_DIR | |
| sudo apt-get update | |
| sudo apt install -y meson wget build-essential ninja-build cmake-extras cmake gettext gettext-base fontconfig libfontconfig-dev libffi-dev libxml2-dev libdrm-dev libxkbcommon-x11-dev libxkbregistry-dev libxkbcommon-dev libpixman-1-dev libudev-dev libseat-dev seatd libxcb-dri3-dev libegl-dev libgles2 libegl1-mesa-dev glslang-tools libinput-bin libinput-dev libxcb-composite0-dev libavutil-dev libavcodec-dev libavformat-dev libxcb-ewmh2 libxcb-ewmh-dev libxcb-present-dev libxcb-icccm4-dev libxcb-render-util0-dev libxcb-res0-dev libxcb-xinput-dev libtomlplusplus3 libre2-dev | |
| git clone --recursive https://github.com/hyprwm/Hyprland | |
| cd Hyprland | |
| make all && sudo make install | |
| Hyprland & | |
| sleep 5 # Give Hyprland some time to start | |
| hyprctl -i 0 dispatch exec "$(pwd)/result/bin/caelestia-shell" | |
| sleep 5 # Give the shell some time to start | |
| pgrep .caelestia-shell || exit 1 # Fail job if shell died | |
| hyprctl -i 0 dispatch exec "$(pwd)/result/bin/caelestia-shell kill" | |
| hyprctl -i 0 dispatch exit | |
| true # Clean exit | |
| - name: Check for changes | |
| id: check | |
| run: echo modified=$(test -n "$(git status --porcelain)" && echo 'true' || echo 'false') >> $GITHUB_OUTPUT | |
| # - name: Commit and push changes | |
| # if: steps.check.outputs.modified == 'true' | |
| # uses: EndBug/add-and-commit@v9 | |
| # with: | |
| # add: flake.lock | |
| # default_author: github_actions | |
| # message: "[CI] chore: update flake" |