Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci/cachix): add cachix as garnix fallback #36

Merged
merged 13 commits into from
Jan 24, 2025
46 changes: 46 additions & 0 deletions .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Cachix build"
on:
check_run:
types:
- completed
jobs:
# debug-info:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: cachix/install-nix-action@v25
# with:
# nix_path: nixpkgs=channel:nixos-unstable

# - name: Print environment variables
# run: env

# - name: Print current directory
# run: pwd

# - name: List files in current directory
# run: ls -al

# - name: Print Nix version
# run: nix --version

# - name: Print event data
# run: 'echo "Event payload: ${{ toJson(github.event) }}"'

# - name: Debug condition
# run: 'echo "Check name: ${{ github.event.check_run.name }}, conclusion: ${{ github.event.check_run.conclusion }}"'
kaeeraa marked this conversation as resolved.
Show resolved Hide resolved

build-and-cache:
if: ${{ github.event.check_run.name == 'Evaluate flake.nix' && github.event.check_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: freesmlauncher
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix-build | cachix push freesmlauncher
- run: nix-shell --run "echo OK"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<div align="center">
<br />

<div>
<img align="center" alt="DRM Free" src="https://img.shields.io/badge/drm-free-d33?style=for-the-badge">
</div>

<br />

<p>
<strong>English</strong> | <a href="https://github.com/FreesmTeam/FreesmLauncher/blob/develop/README_russian.md">Русский</a><br />
</p>

<p>
Freesm Launcher is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once and login with offline account without any restrictions.<br />
<br />This is a <b>fork</b> of the Prism Launcher and is <b>not</b> endorsed by it. <!-- isn't it good? :) -->
Expand Down
9 changes: 6 additions & 3 deletions nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
> We are using Garnix CI for binary caching.
> Proceed to read [this](https://garnix.io/docs/caching),
> if you want to add binary cache manually.
>
> Also we using [Cachix](https://app.cachix.org/cache/freesmlauncher#pull) as fallback for binary caching.
> Read more about it [here](https://docs.cachix.org/getting-started#using-binaries-with-nix).

<h3 align="center"> Using on nixos / nixpkgs </h3>
Freesm isn't in `nixpkgs` (yet?), so you need to add Freesm in `flake.nix`:
Expand All @@ -18,13 +21,13 @@ Freesm isn't in `nixpkgs` (yet?), so you need to add Freesm in `flake.nix`:
};
};
};
outputs = {
self,
outputs = {
self,
nixpkgs,
home-manager,
freesmlauncher,
...
} @ inputs :
} @ inputs :
... # rest of flake.
}
```
Expand Down
Loading