mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-11 13:07:28 -05:00
.github: goofing around with more automation
This commit is contained in:
17
.github/workflows/test_dep_update.sh
vendored
Executable file
17
.github/workflows/test_dep_update.sh
vendored
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p gh jq
|
||||||
|
set -e
|
||||||
|
echo "$GITHUB_API_TOKEN" | gh auth --with-token
|
||||||
|
git branch -d depupdate || true
|
||||||
|
git branch depupdate
|
||||||
|
git checkout depupdate
|
||||||
|
json="$(gh pr list --search "author:app/github-actions" --json headRefName,number)"
|
||||||
|
echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull --rebase origin
|
||||||
|
if nix flake check; then
|
||||||
|
#echo "$json" | jq ".[] | .number | @text" | xargs gh pr merge
|
||||||
|
echo wouldve merged-all
|
||||||
|
else
|
||||||
|
gh issue create \
|
||||||
|
--title "Recent Dependency update PRs failing tests" \
|
||||||
|
--body "I tried to combine these PRs and they failed the test: $(echo "$json" | jq ".[] | .number | @text" | xargs echo '#')"
|
||||||
|
fi
|
23
.github/workflows/tmp-postupdate.yml
vendored
Normal file
23
.github/workflows/tmp-postupdate.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: "tmp postupdate"
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
update-deps:
|
||||||
|
name: Update dependencies
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Nix Flakes doesn't work on shallow clones
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v12
|
||||||
|
with:
|
||||||
|
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
- name: Run test_dep_update
|
||||||
|
env:
|
||||||
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITHUB_BASE_BRANCH: develop
|
||||||
|
run: |
|
||||||
|
./test_dep_update.sh
|
Reference in New Issue
Block a user