From 35fcbe629e7b8b129b3de8f9d0e5805fdf563425 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 23 Nov 2024 17:43:39 +0100 Subject: [PATCH] ci/update-flake: make hyprgrass ref adjustable --- .github/workflows/pin-latest-hyprland.yml | 9 ++++++++- scripts/ci/test-pin.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pin-latest-hyprland.yml b/.github/workflows/pin-latest-hyprland.yml index 80750e8..119ae2c 100644 --- a/.github/workflows/pin-latest-hyprland.yml +++ b/.github/workflows/pin-latest-hyprland.yml @@ -3,6 +3,11 @@ on: workflow_dispatch: schedule: - cron: "0 0 * * 0" # weekly on Sunday 00:00 + inputs: + hyprgrass_pin_target: + description: "Ref of the hyprgrass commit to pin" + required: false + default: "main" jobs: tests: runs-on: ubuntu-latest @@ -19,7 +24,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -eu - ./scripts/ci/pin-latest-hyprland main + git fetch --depth=1 --tags origin '${{inputs.hyprgrass_pin_target}}' + + ./scripts/ci/pin-latest-hyprland '${{inputs.hyprgrass_pin_target}}' if git diff --quiet hyprpm.toml; then # no changes exit 0 fi diff --git a/scripts/ci/test-pin.sh b/scripts/ci/test-pin.sh index 950b89a..032c4d6 100755 --- a/scripts/ci/test-pin.sh +++ b/scripts/ci/test-pin.sh @@ -1,6 +1,6 @@ #!/bin/sh -set -eu +set -eux echoerr () { echo $@ >&2