dotfiles/.woodpecker/agent-release.yml

40 lines
900 B
YAML
Raw Normal View History

2023-10-13 19:18:39 +00:00
depends_on:
- test
when:
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
matrix:
BUILD_TARGET:
2023-10-13 19:18:39 +00:00
- x86_64-linux
- aarch64-linux
steps:
build:
2023-10-25 15:15:57 +00:00
image: git.nikos.gg/prymn/images/nix:f3da8a6b
2023-10-13 19:18:39 +00:00
secrets: [ ATTIC_SECRET ]
commands:
2023-10-25 15:15:57 +00:00
- attic login local http://172.17.0.1:8080 "$${ATTIC_SECRET}"
- attic use prymn-cache
2023-10-13 19:18:39 +00:00
- nix build -L ".#agent-${BUILD_TARGET}"
2023-10-25 15:15:57 +00:00
- attic push prymn-cache ./result
2023-10-13 19:18:39 +00:00
- mkdir -p "dist/${BUILD_TARGET}"
- cp result/bin/prymn_agent "dist/${BUILD_TARGET}/"
release:
image: woodpeckerci/plugin-s3
settings:
bucket: prymn-static
region: auto
endpoint:
from_secret: R2_STATIC_ADDRESS
access_key:
from_secret: R2_DEPLOY_ACCESS_KEY
secret_key:
from_secret: R2_DEPLOY_SECRET_KEY
source: dist/**/*
target: /agent
strip_prefix: dist/