diff options
author | Matthew Jones <matt@mhjones.org> | 2021-04-05 18:35:41 -0400 |
---|---|---|
committer | Matthew Jones <matt@mhjones.org> | 2021-04-05 23:00:32 -0400 |
commit | 6530e55939d2b5b87da36477de26480393c00e05 (patch) | |
tree | 4ab0aee7161eceacb18e7838c738b7805621a139 | |
parent | d9530a7048f4b1c0f65825202a0ce1d111a1d39a (diff) | |
download | nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar.gz nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar.bz2 nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar.lz nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar.xz nixlib-6530e55939d2b5b87da36477de26480393c00e05.tar.zst nixlib-6530e55939d2b5b87da36477de26480393c00e05.zip |
Add a cron-based and manually-triggered github action to update repos/melpa
-rwxr-xr-x | .ci/cron | 19 | ||||
-rw-r--r-- | .ci/exwm-overlay-key.enc | bin | 432 -> 0 bytes | |||
-rw-r--r-- | .ci/exwm-overlay-key.pub | 1 | ||||
-rwxr-xr-x | .ci/push | 14 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 32 | ||||
-rw-r--r-- | .gitlab-ci.yml | 3 |
6 files changed, 32 insertions, 37 deletions
diff --git a/.ci/cron b/.ci/cron deleted file mode 100755 index 3887f42ad48f..000000000000 --- a/.ci/cron +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Note: This script is executed from git root -export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz - -if [ $CI_PIPELINE_SOURCE != "schedule" ] && [ $CI_PIPELINE_SOURCE != "web" ]; then - echo "Only scheduled or manual jobs will run, consider successful" - echo "TODO: This should probably test something meaningful like instantiantion of all derivations" - exit 0 -fi - -mkdir -p ~/.ssh -nix-shell -p openssh --run 'ssh-keyscan github.com >> ~/.ssh/known_hosts' - -nix-shell -p git --run 'git config --global user.name "emacs-overlay"' -nix-shell -p git --run 'git config --global user.email "emacs-overlay@nix-community"' -nix-shell -p git --run 'git remote set-url --push origin git@github.com:nix-community/emacs-overlay.git' - -./update -./.ci/push diff --git a/.ci/exwm-overlay-key.enc b/.ci/exwm-overlay-key.enc deleted file mode 100644 index 43bbe63efe6a..000000000000 --- a/.ci/exwm-overlay-key.enc +++ /dev/null Binary files differdiff --git a/.ci/exwm-overlay-key.pub b/.ci/exwm-overlay-key.pub deleted file mode 100644 index 423de9c8a01c..000000000000 --- a/.ci/exwm-overlay-key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIJIKt9dZ5Z3CcIN0XU61Bmrbm4TXPZ54Gwe3U66rH5m exwm-overlay-key diff --git a/.ci/push b/.ci/push deleted file mode 100755 index 0a7ce7c3d315..000000000000 --- a/.ci/push +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash -p openssl git openssh -set -euo pipefail - -# Note: This script is executed from git root - -export TMP_PLAIN=$(mktemp) -function finish { - rm -rf $TMP_PLAIN -} -trap finish EXIT - -openssl aes-256-cbc -d -salt -pbkdf2 -in ./.ci/exwm-overlay-key.enc -k $SSH_KEY_PASSPHRASE -out $TMP_PLAIN -ssh-agent bash -c "ssh-add $TMP_PLAIN && git push origin HEAD:master" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000000..c6ac5b71c9e6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Update emacs-overlay + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + refresh-overlay: + name: Refresh inputs + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2.3.4 + + - name: Install Nix + uses: cachix/install-nix-action@v13 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Update inputs + run: | + ./update + + - name: Push commit with updated inputs + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git commit -am "Updated repos/melpa" + git pull --rebase + git push diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 79fa2de83ef2..000000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,3 +0,0 @@ -nixos_build_job: - script: - - ./.ci/cron |