-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(actions): add basic set up gh actions
- Loading branch information
Showing
7 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
## Steps To Reproduce | ||
Steps to reproduce the behavior: | ||
1. ... | ||
2. ... | ||
3. ... | ||
|
||
## Expected behavior | ||
A clear and concise description of what you expected to happen. | ||
|
||
## Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
## Additional context | ||
Add any other context about the problem here. | ||
|
||
## Notify maintainers | ||
|
||
<!-- | ||
Please @ people who are in the `meta.maintainers` list of the offending package or module. | ||
If in doubt, check `git blame` for whoever last touched something. | ||
--> | ||
|
||
## Metadata | ||
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result. | ||
|
||
```console | ||
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" | ||
output here | ||
``` | ||
|
||
--- | ||
|
||
Add a :+1: [reaction] to [issues you find important]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: feature-request | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
|
||
--- | ||
|
||
Add a :+1: [reaction] to [issues you find important]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Overview | ||
|
||
<!-- Provide a brief overview of what this PR aims to accomplish. For instance, | ||
is it adding a new configuration, updating an existing one, fixing a bug, or | ||
improving the documentation? --> | ||
|
||
## Testing | ||
|
||
<!-- Describe the testing process for the changes. Include steps to reproduce | ||
any relevant scenarios and the expected outcomes. For example when creating a new | ||
package, test that `nix build` produces the expected binaries/libraries and that | ||
they work as well. Or when adding new NixOS/home-manager modules that you were | ||
able to include them in a NixOS/home-configuration build and that they work.--> | ||
|
||
## Dependencies | ||
|
||
<!-- List any new dependencies introduced by this PR, or if any existing | ||
dependencies are updated or removed. --> | ||
|
||
## Screenshots | ||
<!-- Provide screenshots demonstrating the changes, especially for UI-related | ||
updates (if applicable). --> | ||
|
||
## Checklist | ||
|
||
<!-- Ensure you've gone through this checklist before submitting your PR. --> | ||
|
||
- [ ] I have tested the relevant changes locally. | ||
- [ ] I have checked that `nix flake check` passes. | ||
- [ ] I have ensured my commits follow the project's commits guidelines. | ||
- [ ] I have checked that the changes follow a linear history. | ||
- [ ] (If applicable) I have commented any relevant parts of my code. | ||
- [ ] (If applicable) I have added appropriate unit/feature tests. | ||
- [ ] (If applicable) I have updated the documentation accordingly (in English). | ||
|
||
## Additional Notes | ||
|
||
<!-- Add any other notes, comments, or considerations regarding the PR here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "Push packages and devshells to the cachix binary cache service" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
flake-check: | ||
if: false | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checking out repository..." | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Installing and configuring the nix package manager..." | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: "Setting up magic-nix-cache..." | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: "Settings up cachix binary cache..." | ||
uses: cachix/cachix-action@main | ||
with: | ||
name: tsandrini | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- name: "Building project packages..." | ||
run: nix build | ||
|
||
- name: "Building project devshells..." | ||
run: nix develop --command echo OK | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Run `nix flake-check`" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
repository_dispatch: | ||
types: [create-pull-request] | ||
|
||
jobs: | ||
flake-check: | ||
if: false | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checking out repository..." | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Installing and configuring the nix package manager..." | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: "Setting up magic-nix-cache..." | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: "Running `nix flake check`..." | ||
run: nix flake check --show-trace --accept-flake-config | ||
|
||
- name: "Checking flake inputs for stale & insecure nixpkgs versions..." | ||
uses: DeterminateSystems/flake-checker-action@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Publish flake to FlakeHub" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
flakehub-publish: | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
id-token: "write" | ||
contents: "read" | ||
steps: | ||
- name: "Checking out repository..." | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Installing and configuring the nix package manager..." | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: "Setting up magic-nix-cache..." | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: "Publishing flake to FlakeHub..." | ||
uses: DeterminateSystems/flakehub-push@main | ||
with: | ||
name: "tsandrini/flake-parts-builder" | ||
rolling: true | ||
visibility: "public" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "Periodically update flake inputs in flake.lock" | ||
|
||
on: | ||
workflow_dispatch: # allows manual triggering | ||
schedule: | ||
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00 | ||
|
||
jobs: | ||
update-flake-lock: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checking out repository..." | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Installing and configuring the nix package manager..." | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: "Setting up magic-nix-cache..." | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: "Updating flake.lock..." | ||
uses: DeterminateSystems/update-flake-lock@main | ||
with: | ||
pr-title: "Automated action - Update flake.lock" | ||
pr-labels: | | ||
dependencies | ||
automated | ||
# NOTE You can use a personal access token to identify | ||
# as a concrete user, this may be useful when you want to | ||
# trigger additional CI actions. | ||
# | ||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} |