forked from Fediversity/Fediversity
port cache workflow to woodpecker
This commit is contained in:
parent
dec7d9981c
commit
bd82284a0f
2 changed files with 25 additions and 25 deletions
|
@ -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
25
.woodpecker/cache.yaml
Normal 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
|
Loading…
Add table
Reference in a new issue