Skip to content

Commit

Permalink
ci: also publish to GitHub Packages (#54)
Browse files Browse the repository at this point in the history
Allow Github users to not have another external dependency.
  • Loading branch information
zimbatm authored Jul 24, 2024
1 parent 3edc0c9 commit 0ce26f2
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
schedule:
# Run once per day
- cron: '0 0 * * *'

jobs:
build:
strategy:
Expand All @@ -18,9 +19,14 @@ jobs:
- nixos-unstable
- nixos-24.05
system:
- x86_64-linux
- aarch64-linux
- x86_64-linux
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand All @@ -33,12 +39,24 @@ jobs:
extra-platforms = aarch64-linux
- uses: DeterminateSystems/magic-nix-cache-action@main

- run: nix-shell --run ./ci.sh
- name: Push to Docker Hub
run: nix-shell --run ./ci.sh
env:
CI_PROJECT_PATH: 'nixpkgs'
CI_REGISTRY: 'docker.io'
CI_REGISTRY_AUTH: '${{ secrets.REGISTRY_AUTH }}'
NIXPKGS_CHANNEL: '${{ matrix.channel }}'
NIX_SYSTEM_NAME: '${{ matrix.system }}'

- name: Push to GitHub Pages
run: nix-shell --run ./ci.sh
env:
CI_PROJECT_PATH: 'nix-community/docker-nixpkgs'
CI_REGISTRY: 'ghcr.io'
CI_REGISTRY_AUTH: '${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}'
NIXPKGS_CHANNEL: '${{ matrix.channel }}'
NIX_SYSTEM_NAME: '${{ matrix.system }}'

push-manifest:
needs: [build]
strategy:
Expand Down

0 comments on commit 0ce26f2

Please sign in to comment.