This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
name: Compile ESPHome
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compile:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v26
|
||||||
|
with:
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
extra_nix_config: |
|
||||||
|
sandbox = false
|
||||||
|
|
||||||
|
- name: Enable unprivileged user namespaces
|
||||||
|
run: sudo sysctl -w kernel.unprivileged_userns_clone=1 || true
|
||||||
|
|
||||||
|
- name: Install direnv
|
||||||
|
run: sudo apt-get install -y direnv
|
||||||
|
|
||||||
|
- name: Prepare secrets
|
||||||
|
run: |
|
||||||
|
if [ -f templates/secrets.yaml.sample ]; then
|
||||||
|
cp templates/secrets.yaml.sample secrets.yaml
|
||||||
|
elif [ -f secrets.yaml.sample ]; then
|
||||||
|
cp secrets.yaml.sample secrets.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Allow direnv
|
||||||
|
run: direnv allow .
|
||||||
|
|
||||||
|
- name: Compile
|
||||||
|
run: direnv exec . ./reflash.sh compile ''
|
||||||
Reference in New Issue
Block a user