-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (40 loc) · 1.37 KB
/
pin-latest-hyprland.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: "Update hyprpm pin on latest Hyprland release"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # weekly on Sunday 00:00
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
extra-substituters = https://hyprland.cachix.org
extra-trusted-public-keys = hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=
- name: Update pins
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eu
git fetch --depth=1 --tags origin v0.8.2
echo remotes
git remote
echo show-ref
git show-ref
echo test rev-parse
git rev-parse v0.8.2
./scripts/ci/pin-latest-hyprland v0.8.2
if git diff --quiet hyprpm.toml; then # no changes
exit 0
fi
branchName="chore/pin-update$(%Y%m%d%H%M%S)"
git checkout -b "$branchName"
git add hyprpm.toml
git commit -m 'ci: automated update of hyprpm.toml'
gh pr create --base main \
--head "$branchName" \
--title 'Automated PR: Update hyprpm pin' \
--body 'This PR was created by a Github Actions workflow'