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