Cleanup actions to run on forgejo
All checks were successful
Build and Push to Cachix / Push to Binary Cache (aarch64) (push) Successful in 6m4s
Build and Push to Cachix / Push to Binary Cache (X86-64) (push) Successful in 1m34s

This commit is contained in:
Adithya 2024-10-31 11:24:51 +05:30
parent a00042b8e1
commit fc48a9749d
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
5 changed files with 94 additions and 64 deletions

View file

@ -0,0 +1,63 @@
name: Build and Push to Cachix
on:
push:
branches:
- main
workflow_run:
workflows: ['Update Inputs']
types: [completed]
branches:
- main
workflow_dispatch:
jobs:
publish-x86_64:
name: Push to Binary Cache (X86-64)
runs-on: x86_64-docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nix
uses: https://github.com/cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}
- name: Authenticate with Cachix
uses: https://github.com/cachix/cachix-action@v15
with:
name: adtya
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build and push flake output
run: |
nix build -L .#caddy --access-tokens "github.com=${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}"
publish-aarch64:
name: Push to Binary Cache (aarch64)
runs-on: aarch64-docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Nix
uses: https://github.com/cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}
- name: Authenticate with Cachix
uses: https://github.com/cachix/cachix-action@v15
with:
name: adtya
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build and push flake output
run: |
nix build -L .#caddy --access-tokens "github.com=${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}"

View file

@ -0,0 +1,30 @@
name: Update Inputs
on:
schedule:
- cron: "0 0 * * 5"
workflow_dispatch:
jobs:
update-inputs:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:act-22.04
name: Update Inputs
steps:
- uses: actions/checkout@v4
with:
token: ${{ github.token }}
ref: ${{ github.head_ref }}
- uses: https://github.com/cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}
- name: Update inputs
run: |
nix flake update --access-tokens "github.com=${{ secrets.GH_PUBLIC_REPO_ACCESS_TOKEN }}"
- name: Commit changes
uses: https://github.com/EndBug/add-and-commit@v9
with:
message: 'Actions: Update Inputs'
add: 'flake.lock'

View file

@ -1,35 +0,0 @@
name: Build and Push to Cachix
on:
push:
branches:
- main
workflow_run:
workflows: ['Update Inputs']
types: [completed]
branches:
- main
jobs:
publish:
name: Publish Flake
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [x86_64, aarch64]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@V27
- name: Authenticate with Cachix
uses: cachix/cachix-action@v15
with:
name: adtya
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build nix flake
run: nix build -L .#caddy

View file

@ -1,28 +0,0 @@
name: Update Inputs
on:
schedule:
- cron: "0 0 * * 5"
workflow_dispatch:
jobs:
update-inputs:
runs-on: ubuntu-latest
name: Update Inputs
steps:
- uses: actions/checkout@v3
with:
token: ${{ github.token }}
ref: ${{ github.head_ref }}
- uses: cachix/install-nix-action@v20
with:
github_access_token: ${{ github.token }}
- name: Update inputs
run: |
nix flake update
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'Actions: Update Inputs'
default_author: github_actions
add: 'flake.lock'

View file

@ -1,4 +1,4 @@
# A [Caddy](https://caddyserver.com/) build that includes the [Digitalocean DNS module](https://github.com/caddy-dns/digitalocean) # A [Caddy](https://caddyserver.com/) build that includes the [Hetzner DNS module](https://github.com/caddy-dns/hetzner)
## Stolen from [pinpox](https://github.com/pinpox/nixos-caddy-patched) and [Ramblurr](https://github.com/Ramblurr/nixos-caddy) ## Stolen from [pinpox](https://github.com/pinpox/nixos-caddy-patched) and [Ramblurr](https://github.com/Ramblurr/nixos-caddy)
### Explore further: ### Explore further: