added workflow
This commit is contained in:
parent
4e391d9a49
commit
946c0e59de
34
.gitea/workflows/update-image.yaml
Normal file
34
.gitea/workflows/update-image.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
name: sdlan release push
|
||||
run-name: ${{ gitea.actor }} is building release 🚀
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: TAG推送自动编译
|
||||
id: compile
|
||||
working-directory: /usr/local/gitea-workflow/workspace/sdlan-lib-rs
|
||||
run: |
|
||||
flock -n build.lock -c '
|
||||
rm /usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/x86_64-unknown-linux-musl/debian/*.deb || true
|
||||
rm /usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/aarch64-unknown-linux-musl/debian/*.deb || true
|
||||
make deb-musl
|
||||
make deb-aarch64
|
||||
echo "built=true" >> $GITHUB_OUTPUT
|
||||
' || {
|
||||
echo "其他编译正在进行中,跳过本次执行"
|
||||
echo "built=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
}
|
||||
|
||||
- name: Upload Release Assets
|
||||
if: steps.compile.outputs.built == 'true'
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
files: |
|
||||
/usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/x86_64-unknown-linux-musl/debian/*.deb
|
||||
/usr/local/gitea-workflow/workspace/sdlan-lib-rs/target/aarch64-unknown-linux-musl/debian/*.deb
|
||||
Loading…
x
Reference in New Issue
Block a user