add update
This commit is contained in:
62
example/macos/woodpecker.yml
Normal file
62
example/macos/woodpecker.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
# .woodpecker.yml (macOS Local Agent)
|
||||
labels:
|
||||
host: Mac-mini.local
|
||||
platform: darwin/arm64
|
||||
|
||||
when:
|
||||
event: [push, manual]
|
||||
|
||||
steps:
|
||||
- name: build-app
|
||||
image: /bin/zsh
|
||||
commands:
|
||||
- echo "Building on macOS..."
|
||||
- mkdir -p build/output
|
||||
- echo "Binary placeholder" > build/output/app
|
||||
- echo "Config file" > build/output/config.json
|
||||
- ls -R build/
|
||||
|
||||
- name: upload-single-file
|
||||
image: /bin/zsh
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
S3_BUCKET:
|
||||
from_secret: S3_BUCKET
|
||||
S3_ENDPOINT:
|
||||
from_secret: S3_ENDPOINT
|
||||
commands:
|
||||
- |
|
||||
echo "📦 Uploading config file..."
|
||||
export PLUGIN_SOURCE="build/output/config.json"
|
||||
export PLUGIN_BUCKET="$S3_BUCKET"
|
||||
export PLUGIN_TARGET="configs/"
|
||||
export PLUGIN_ENDPOINT="$S3_ENDPOINT"
|
||||
export PLUGIN_PATH_STYLE=true
|
||||
plugin-s3
|
||||
echo "✅ Config uploaded"
|
||||
|
||||
- name: upload-build-folder
|
||||
image: /bin/zsh
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
S3_BUCKET:
|
||||
from_secret: S3_BUCKET
|
||||
S3_ENDPOINT:
|
||||
from_secret: S3_ENDPOINT
|
||||
commands:
|
||||
- |
|
||||
echo "📦 Uploading entire build folder..."
|
||||
export PLUGIN_SOURCE="build/output/**/*"
|
||||
export PLUGIN_BUCKET="$S3_BUCKET"
|
||||
export PLUGIN_TARGET="builds/macos-$(date +%Y%m%d-%H%M%S)/"
|
||||
export PLUGIN_ENDPOINT="$S3_ENDPOINT"
|
||||
export PLUGIN_PATH_STYLE=true
|
||||
export PLUGIN_STRIP_PREFIX="build/output/"
|
||||
plugin-s3
|
||||
echo "✅ Build folder uploaded"
|
||||
Reference in New Issue
Block a user