From bd82284a0f37e99880d977d68f0d160fd39a9bd7 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Fri, 8 Aug 2025 12:25:52 +0200 Subject: [PATCH] port cache workflow to woodpecker --- .forgejo/workflows/cache.yaml | 25 ------------------------- .woodpecker/cache.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 .forgejo/workflows/cache.yaml create mode 100644 .woodpecker/cache.yaml diff --git a/.forgejo/workflows/cache.yaml b/.forgejo/workflows/cache.yaml deleted file mode 100644 index 103e73c9..00000000 --- a/.forgejo/workflows/cache.yaml +++ /dev/null @@ -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)" diff --git a/.woodpecker/cache.yaml b/.woodpecker/cache.yaml new file mode 100644 index 00000000..17e400fa --- /dev/null +++ b/.woodpecker/cache.yaml @@ -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