Add minimal configuration for builds.sr.ht
This commit is contained in:
parent
f21b48eadf
commit
ee541dad0a
2 changed files with 36 additions and 0 deletions
19
.build.yml
Normal file
19
.build.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
image: alpine/latest
|
||||
packages:
|
||||
- elixir
|
||||
artifacts:
|
||||
- ha-handler/_build/prod/rel/ha-handler.tar.gz
|
||||
sources:
|
||||
- https://code.recycled.cloud/RecycledCloud/ha-handler.git
|
||||
tasks:
|
||||
- setup: |
|
||||
cd ha-handler
|
||||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
mix deps.get
|
||||
- release: |
|
||||
cd ha-handler
|
||||
MIX_ENV=prod mix compile
|
||||
MIX_ENV=prod mix release
|
||||
cd _build/prod/rel
|
||||
tar cvzf ha-handler.tar.gz ha_handler/
|
17
run-ci.sh
Executable file
17
run-ci.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BUILDS_INSTANCE=https://builds.sr.ht
|
||||
MANIFEST=.build.yml
|
||||
|
||||
if [ -z "$SRHT_ACCESS_TOKEN" ]; then
|
||||
echo "Please set SRHT_ACCESS_TOKEN before calling this script." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl \
|
||||
-H Authorization:"token $SRHT_ACCESS_TOKEN" \
|
||||
--data "manifest=$(jq -R -r --slurp < $MANIFEST)" \
|
||||
--data "note=recycledcloud-ha-handler" \
|
||||
-X POST $BUILDS_INSTANCE/api/jobs | jq
|
Loading…
Reference in a new issue