port cache workflow to woodpecker

This commit is contained in:
Kiara Grouwstra 2025-08-08 12:25:52 +02:00
parent dec7d9981c
commit bd82284a0f
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
2 changed files with 25 additions and 25 deletions

View file

@ -1,25 +0,0 @@
name: cache-build
on:
workflow_dispatch: # allows manual triggering
push:
branches:
# - main
jobs:
deploy:
runs-on: native
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache
run: |
nix-shell --run "attic login fediversity https://attic.fediversity.net '${{ secrets.ATTIC_PUSH_KEY }}' && attic use demo"
env
mkdir -p ~/.ssh
echo "${{ secrets.CD_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
cat ~/.config/attic/config.toml
cat ~/.config/nix/nix.conf
nix-shell --run "attic push demo $(nix-build)"

25
.woodpecker/cache.yaml Normal file
View file

@ -0,0 +1,25 @@
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/refs/heads/main/pipeline/frontend/yaml/linter/schema/schema.json
when:
- event: manual
- event: push
branch: main
steps:
- name: cache-build
image: nixos/nix
commands:
- |
nix-shell --run "attic login fediversity https://attic.fediversity.net '$ATTIC_PUSH_KEY' && attic use demo"
env
mkdir -p ~/.ssh
echo "$CD_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
cat ~/.config/attic/config.toml
cat ~/.config/nix/nix.conf
nix-shell --run "attic push demo $(nix-build)"
environment:
ATTIC_PUSH_KEY:
from_secret: attic_push_key
CD_SSH_KEY:
from_secret: cd_ssh_key