diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml new file mode 100644 index 0000000..2e9aa37 --- /dev/null +++ b/.forgejo/workflows/deploy.yaml @@ -0,0 +1,53 @@ +name: Build_Deploy + +on: + workflow_run: + workflows: [ "Update_Flake" ] + types: + - completed + push: + paths: + - applications/**/* + - machines/**/* + - secrets/**/* + - flake.* + - config/**/* + - .forgejo/**/* + +jobs: + linter: + runs-on: nix + steps: + - uses: actions/checkout@v4 + - run: nix fmt -- --check . + + #if: github.repository == 'Skynet/nixos' + build: + runs-on: nix + steps: + - uses: actions/checkout@v4 + - run: nix develop + - run: colmena build -v --on @active-dns + - run: colmena build -v --on @active-core + - run: colmena build -v --on @active + - run: colmena build -v --on @active-ext + - run: colmena build -v --on @active-gitlab + + deploy_dns: + runs-on: nix + needs: [ linter, build ] + steps: + - uses: actions/checkout@v4 + - run: colmena apply -v --on @active-dns --show-trace + shell: bash + + deploy_active: + strategy: + matrix: + batch: [ active-core, active, active-ext ] + runs-on: nix + needs: [ deploy_dns ] + steps: + - uses: actions/checkout@v4 + - run: colmena apply -v --on @${{ matrix.batch }} --show-trace + shell: bash \ No newline at end of file diff --git a/.forgejo/workflows/update_input.yaml b/.forgejo/workflows/update_input.yaml new file mode 100644 index 0000000..8a62c4f --- /dev/null +++ b/.forgejo/workflows/update_input.yaml @@ -0,0 +1,29 @@ +name: Update_Flake + +on: + workflow_dispatch: + inputs: + input_to_update: + description: 'Flake input to update' + required: true + type: string + +jobs: + update: + runs-on: nix + + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.PIPELINE_TOKEN }} + - run: nix flake lock --update-input "${{ inputs.input_to_update }}" + shell: bash + - uses: https://github.com/stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Updated flake for ${{ inputs.input_to_update }}" \ No newline at end of file diff --git a/mailmap b/.mailmap similarity index 100% rename from mailmap rename to .mailmap