Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tadfisher committed Dec 21, 2023
1 parent 0426fe0 commit 4a349f5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-10.15]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v26
with:
nix_conf: experimental-features = nix-command flakes
- name: test
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v26
with:
nix_conf: experimental-features = nix-command flakes
- name: update flake inputs
Expand All @@ -30,22 +30,20 @@ jobs:
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v26
with:
nix_conf: experimental-features = nix-command flakes
- name: build nixexprs
run: ./scripts/channel.sh
- name: deploy nix channel
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@4.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
CLEAN: true
SINGLE_COMMIT: true
GIT_CONFIG_NAME: "github-actions"
GIT_CONFIG_EMAIL: "[email protected]"
token: ${{ secrets.GITHUB_TOKEN }}
folder: pages-build
single-commit: true
git-config-name: "github-actions"
git-config-email: "[email protected]"
sync:
runs-on: ubuntu-latest
needs: update
Expand All @@ -60,7 +58,7 @@ jobs:
from_branch: main
target_branch: ${{ matrix.channel }}
github_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ matrix.channel }}
- name: tag ${{ matrix.channel }}
Expand Down
10 changes: 5 additions & 5 deletions scripts/channel.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

mkdir -p build
touch build/index.html
echo 'https://android.cachix.org' > build/binary-cache-url
git show-ref refs/heads/main --hash > build/git-revision
tar -cJf build/nixexprs.tar.xz default.nix channels pkgs \
mkdir -p pages-build
touch pages-build/index.html
echo 'https://android.cachix.org' > pages-build/binary-cache-url
git show-ref refs/heads/main --hash > pages-build/git-revision
tar -cJf pages-build/nixexprs.tar.xz default.nix channels pkgs \
--transform "s,^,${PWD##*/}/," \
--owner=0 --group=0 --mtime="1970-01-01 00:00:00 UTC"

0 comments on commit 4a349f5

Please sign in to comment.