forked from NixOS/nixos-homepage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#403 from NixOS/update-nixpkgs-on-cron
Update flake.lock in cronjob
- Loading branch information
Showing
3 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,30 @@ on: | |
schedule: | ||
- cron: '0 * * * *' | ||
jobs: | ||
build-and-deploy: | ||
hourly-build-and-deploy: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- name: Checking out the repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Installing Nix | ||
uses: cachix/install-nix-action@v8 | ||
- name: Installing NixFlakes | ||
run: | | ||
nix-env -iA nixpkgs.nixFlakes | ||
echo "::add-path::$HOME/.nix-profile/bin" | ||
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf | ||
nix --version | ||
cat /etc/nix/nix.conf | ||
- name: Update content | ||
run: ./update.sh | ||
- name: Building nixos.org | ||
run: nix-build && mkdir build && cp -RL ./result/* ./build/ | ||
run: | | ||
nix build | ||
mkdir build | ||
cp -RL ./result/* ./build/ | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
env: | ||
|
@@ -26,4 +37,11 @@ jobs: | |
production-branch: 'master' | ||
deploy-message: 'Deploy from GitHub Actions' | ||
if: github.repository == 'NixOS/nixos-homepage' | ||
|
||
- name: Commit flake.lock, blogs.xml and push to master branch | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
push-branch: 'master' | ||
commit-message: 'Update flake.lock and blogs.xml [ci skip]' | ||
files: flake.lock blogs.xml | ||
if: github.repository == 'NixOS/nixos-homepage' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,28 @@ on: | |
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- name: Checking out the repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Installing Nix | ||
uses: cachix/install-nix-action@v8 | ||
- name: Installing NixFlakes | ||
run: | | ||
nix-env -iA nixpkgs.nixFlakes | ||
echo "::add-path::$HOME/.nix-profile/bin" | ||
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf | ||
nix --version | ||
cat /etc/nix/nix.conf | ||
- name: Update content | ||
run: ./update.sh | ||
- name: Building nixos.org | ||
run: nix-build && mkdir build && cp -RL ./result/* ./build/ | ||
run: | | ||
nix build | ||
mkdir build | ||
cp -RL ./result/* ./build/ | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#! /bin/sh | ||
|
||
UPDATE=1 nix run nixpkgs#gnumake nixpkgs#curl -c make update --keep-going || true | ||
set -e | ||
|
||
nix flake update --update-input released-nixpkgs || true | ||
UPDATE=1 nix run nixpkgs#gnumake nixpkgs#curl -c make update --keep-going | ||
|
||
nix flake update \ | ||
--update-input released-nixpkgs \ | ||
--update-input nix-pills |