mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-03 12:27:27 -05:00
.github: move it into update-dependencies.yml and finish up
This commit is contained in:
5
.github/workflows/test_dep_update.sh
vendored
5
.github/workflows/test_dep_update.sh
vendored
@ -1,15 +1,14 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p gh jq
|
#!nix-shell -i bash -p gh jq
|
||||||
set -e
|
set -e
|
||||||
echo "$GITHUB_API_TOKEN" | gh auth --with-token
|
echo "$GITHUB_API_TOKEN" | gh auth login --with-token
|
||||||
git branch -d depupdate || true
|
git branch -d depupdate || true
|
||||||
git branch depupdate
|
git branch depupdate
|
||||||
git checkout depupdate
|
git checkout depupdate
|
||||||
json="$(gh pr list --search "author:app/github-actions" --json headRefName,number)"
|
json="$(gh pr list --search "author:app/github-actions" --json headRefName,number)"
|
||||||
echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull --rebase origin
|
echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull --rebase origin
|
||||||
if nix flake check; then
|
if nix flake check; then
|
||||||
#echo "$json" | jq ".[] | .number | @text" | xargs gh pr merge
|
echo "$json" | jq ".[] | .number | @text" | xargs -L1 -- gh pr merge --rebase --delete-branch
|
||||||
echo wouldve merged-all
|
|
||||||
else
|
else
|
||||||
gh issue create \
|
gh issue create \
|
||||||
--title "Recent Dependency update PRs failing tests" \
|
--title "Recent Dependency update PRs failing tests" \
|
||||||
|
23
.github/workflows/tmp-postupdate.yml
vendored
23
.github/workflows/tmp-postupdate.yml
vendored
@ -1,23 +0,0 @@
|
|||||||
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
|
|
30
.github/workflows/update-dependencies.yml
vendored
30
.github/workflows/update-dependencies.yml
vendored
@ -20,12 +20,38 @@ jobs:
|
|||||||
- name: Create PRs for dependencies
|
- name: Create PRs for dependencies
|
||||||
env:
|
env:
|
||||||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_BASE_BRANCH: develop
|
GITHUB_BASE_BRANCH: master
|
||||||
run: |
|
run: |
|
||||||
nix develop -c .github/workflows/update_flake_lock.py
|
nix develop -c .github/workflows/update_flake_lock.py
|
||||||
- name: Create PR for updated init.el
|
- name: Create PR for updated init.el
|
||||||
env:
|
env:
|
||||||
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_BASE_BRANCH: develop
|
GITHUB_BASE_BRANCH: master
|
||||||
run: |
|
run: |
|
||||||
nix develop -c .github/workflows/update_init_el.py
|
nix develop -c .github/workflows/update_init_el.py
|
||||||
|
automerge-deps:
|
||||||
|
name: Automerge dependency updates
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Configure git
|
||||||
|
run: |
|
||||||
|
git config --global core.autocrlf false
|
||||||
|
git config --global user.name github-actions[bot]
|
||||||
|
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
- 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: |
|
||||||
|
nixpkgs="$(nix eval --impure --expr 'toString (builtins.getFlake (toString ./.)).inputs.nixpkgs' | tr -d '"')"
|
||||||
|
nix-store --realize "$nixpkgs"
|
||||||
|
NIX_PATH=nixpkgs="$nixpkgs" .github/workflows/test_dep_update.sh
|
||||||
|
Reference in New Issue
Block a user