main
1when:
2 - event: [cron, manual]
3 cron: "update flake lock"
4
5steps:
6 - name: update
7 image: docker.io/nixos/nix:2.32.8
8 commands:
9 - nix flake update --extra-experimental-features "flakes nix-command"
10
11 - name: setup-remote
12 image: docker.io/alpine/git
13 commands:
14 - export REPO_URL="https://$${CI_REPO_OWNER}:$${TOKEN}@codeberg.org/$${CI_REPO_OWNER}/$${CI_REPO_NAME}.git"
15 - git remote set-url origin "$${REPO_URL}"
16 environment:
17 TOKEN:
18 from_secret: forge_token
19
20 - name: push
21 image: docker.io/appleboy/drone-git-push:1.2.3
22 settings:
23 remote_name: origin
24 commit: true
25 commit_message: "Update Nix flake lock"
26 author_name: "Woodpecker-CI [bot]"
27 author_email: woodpecker-ci@noreply.example.org
28 branch: ci/update-flake-lock
29 force: true
30
31 - name: create-pr
32 image: docker.io/woodpeckercommunity/gitea-pull-request-create-plugin:0.1.3
33 settings:
34 gitea_address: https://codeberg.org
35 gitea_token:
36 from_secret: forge_token
37 owner: ${CI_REPO_OWNER}
38 repo: ${CI_REPO_NAME}
39 branch: ci/update-flake-lock
40 base_branch: main
41 close_pr_if_empty: true
42 delete_branch_if_pr_empty: true
43 pr_title: "CI: Update Nix flake lock"
44 pr_body: |
45 PR automatically created by Woodpecker CI.
46
47 Update Nix flake lock to latest.