Skip to content

Commit

Permalink
yo
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed Jul 24, 2024
1 parent b8b1819 commit 5119a64
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ jobs:
system:
- aarch64-linux
- x86_64-linux
registry:
- name: ghcr.io
image_prefix: nix-community/docker-nixpkgs
- name: docker.io
image_prefix: nixpkgs
runs-on: ubuntu-latest

permissions:
Expand All @@ -44,27 +39,25 @@ jobs:
extra-platforms = aarch64-linux
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Log in to GitHub Packages
if: "${{ matrix.registry.name == 'ghcr.io' }}"
uses: docker/[email protected]
with:
registry: ${{ matrix.registry.name }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
if: "${{ matrix.registry.name == 'docker.io' }}"
run: |
echo "CI_REGISTRY_AUTH=${{ secrets.REGISTRY_AUTH }}" >> $GITHUB_ENV
- 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 }}'

- run: nix-shell --run ./ci.sh
- name: Push to GitHub Pages
run: nix-shell --run ./ci.sh
env:
CI_PROJECT_PATH: '${{ matrix.registry.image_prefix }}'
CI_REGISTRY: '${{ matrix.registry.name }}'
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 }}'

docker-hub-manifests:
push-manifest:
needs: [build]
strategy:
fail-fast: false
Expand Down
5 changes: 5 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ fi

banner "docker push"
./push-all "$registry" "$image_prefix" "$image_tag"

if [[ -n "${registry_auth}" && $registry = *docker.io ]]; then
banner "docker metadata update"
./dockerhub-metadata "$registry_auth" "$image_prefix"
fi

0 comments on commit 5119a64

Please sign in to comment.