Skip to content

Commit

Permalink
Add github workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rayavanindra committed Feb 12, 2024
1 parent f8077ab commit 45e1d8f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches: [ dfc ]
jobs:
node-docker:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy-20220130

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: apt update && apt upgrade -y
- run: ln -fs /usr/share/zoneinfo/Asia/Kolkata /etc/localtime && date
- run: apt install -f -y git bison flex libxml2 libssl-dev bc zip default-jre python3 python3-pip wget curl cpio bash python2
- run: sh build.sh
env:
token: ${{ secrets.TOKEN }}
chat_id: ${{ secrets.CHAT_ID }}
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@ sha1sum $FINAL_KERNEL_ZIP

BUILD_END=$(date +"%s")
DIFF=$(($BUILD_END - $BUILD_START))
echo -e "$yellow Build completed in $(($DIFF / 60)) minute(s) and $(($DIFF % 60)) seconds.$nocol"

post_msg="Build completed in $(($DIFF / 60)) minute(s) and $(($DIFF % 60)) seconds."
curl -v -F chat_id=$chat_id -F document=@$FINAL_KERNEL_ZIP -F caption="$post_msg" https://api.telegram.org/bot$token/sendDocument

0 comments on commit 45e1d8f

Please sign in to comment.