diff --git a/.forgejo/workflows/nix.yaml b/.forgejo/workflows/nix.yaml deleted file mode 100644 index 61fc287..0000000 --- a/.forgejo/workflows/nix.yaml +++ /dev/null @@ -1,124 +0,0 @@ -name: nix - -on: - pull_request: - branches: [main] - push: - schedule: - - cron: 0 0 * * 1 - -env: - REGISTRY: git.nexveridian.com - IMAGE_NAME: ${{ github.repository }} - NIX_CONFIG: "experimental-features = nix-command flakes" - CONTAINER_TOKEN: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} - -jobs: - build: - runs-on: nix - permissions: - contents: read - packages: write - id-token: write - - steps: - - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client login nex https://nix.nexveridian.com ${{ secrets.ATTIC_TOKEN }} || true - - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client cache create docker-nixpkgs || true - - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client cache configure docker-nixpkgs -- --priority 30 || true - - run: nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client use docker-nixpkgs || true - - - name: Install Node.js - run: | - mkdir -p ~/.local/bin - nix build -I nixpkgs=channel:nixos-unstable nixpkgs#nodejs_24 -o ~/.local/nodejs - ln -sf ~/.local/nodejs/bin/node ~/.local/bin/node - ln -sf ~/.local/nodejs/bin/npm ~/.local/bin/npm - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - uses: actions/checkout@v4 - - - name: Install skopeo - run: | - mkdir -p ~/.local/bin - nix build -I nixpkgs=channel:nixos-unstable nixpkgs#skopeo -o ~/.local/skopeo - ln -sf ~/.local/skopeo/bin/skopeo ~/.local/bin/skopeo - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Build Nix package - run: nix-build -A action-attic - - - name: Prepare repository variables - run: | - echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} - echo "OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> ${GITHUB_ENV} - # Extract just the repository name (everything after the last slash) - REPO_NAME=${GITHUB_REPOSITORY##*/} - echo "IMAGE_NAME=action-attic" >> ${GITHUB_ENV} - - - name: Setup skopeo policy and push image - run: | - # configure container policy to accept insecure registry - mkdir -p ~/.config/containers - cat > ~/.config/containers/policy.json < ~/.docker/config.json </dev/null 2>&1; then - valid_paths="$valid_paths $path" - fi - done - - if [ -n "$valid_paths" ]; then - for i in {1..10}; do - nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push docker-nixpkgs $valid_paths && break || [ $i -eq 5 ] || sleep 5 - done - fi diff --git a/images/action-attic/default.nix b/images/action-attic/default.nix deleted file mode 100644 index 990aa7e..0000000 --- a/images/action-attic/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - docker-nixpkgs, - pkgs, - attic-client, - nodejs_24, - nix-fast-build, -}: -(docker-nixpkgs.nix.override { - nix = pkgs.nixVersions.latest; - - extraContents = [ - attic-client - nodejs_24 - nix-fast-build - ]; -}).overrideAttrs - (prev: { - meta = (prev.meta or { }) // { - description = "Forgejo action image, with Nix and Attic client"; - }; - })