diff options
| author | seth <[email protected]> | 2023-05-11 02:07:22 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-11 02:13:25 -0400 |
| commit | 921963cce4b5c0e6516a841f2be9680802201512 (patch) | |
| tree | 3441dcea5097c6a42a569262505acdd9a756b3da /.github/workflows | |
| parent | d9bf460ac787be758a61efaed178a78c3b915265 (diff) | |
feat: start using packwiz2nix
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build-modpack.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/update-checksums.yml | 33 | ||||
| -rw-r--r-- | .github/workflows/update-mods.yml | 20 |
3 files changed, 48 insertions, 12 deletions
diff --git a/.github/workflows/build-modpack.yml b/.github/workflows/build-modpack.yml index 35fbf02..aace7f9 100644 --- a/.github/workflows/build-modpack.yml +++ b/.github/workflows/build-modpack.yml @@ -1,7 +1,10 @@ -name: build modpack +name: Build modpack on: push: + paths: + # only run when prismlauncher modpack files are changed + - nix/files/** workflow_dispatch: jobs: @@ -14,7 +17,7 @@ jobs: - name: build run: | - nix build .#getchoo-modpack + nix build - name: upload uses: actions/upload-artifact@v3 diff --git a/.github/workflows/update-checksums.yml b/.github/workflows/update-checksums.yml new file mode 100644 index 0000000..7a5b9a3 --- /dev/null +++ b/.github/workflows/update-checksums.yml @@ -0,0 +1,33 @@ +name: Update mod checksums + +on: + push: + paths: + # only run when mod files are changed + - mods/** + workflow_dispatch: + workflow_run: + workflows: ["Update mods"] + types: + - completed + +permissions: + contents: write + +jobs: + build-modpack: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v20 + + - name: generate new checksums + run: | + nix run --impure .#generate-checksums + + - name: commit changes + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: "chore(flake): update mod checksums" diff --git a/.github/workflows/update-mods.yml b/.github/workflows/update-mods.yml index 9fbfea5..03c3df4 100644 --- a/.github/workflows/update-mods.yml +++ b/.github/workflows/update-mods.yml @@ -1,27 +1,27 @@ name: Update mods on: - workflow_dispatch: schedule: + # run daily at 0:00 utc - cron: "0 0 * * *" + workflow_dispatch: + +permissions: + contents: write jobs: update-mods: runs-on: ubuntu-latest steps: - - name: get packwiz - run: | - curl -fsSLo ~/packwiz.zip https://nightly.link/packwiz/packwiz/workflows/go/main/Linux%2064-bit%20x86.zip - unzip -d ~ ~/packwiz.zip - chmod 755 ~/packwiz - - uses: actions/[email protected] + - uses: cachix/install-nix-action@v20 - - name: update mods + - name: update run: | - echo "y" | ~/packwiz update --all + echo "y" | nix run nixpkgs#packwiz -- update --all - - uses: EndBug/add-and-commit@v9 + - name: commit changes + uses: EndBug/add-and-commit@v9 with: default_author: github_actions message: "chore: update mods" |
