Compare commits
1 commit
b26c2e1ac4
...
ad6b29b4c1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ad6b29b4c1 |
1 changed files with 2 additions and 14 deletions
|
@ -1,9 +1,4 @@
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-changes:
|
check-changes:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
@ -72,15 +67,10 @@ jobs:
|
||||||
run: npx playwright test
|
run: npx playwright test
|
||||||
- name: Build WebUI
|
- name: Build WebUI
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
# The following steps only run on push to main
|
|
||||||
- name: Get current block
|
- name: Get current block
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
id: getBlockHeight
|
id: getBlockHeight
|
||||||
run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
run: echo "blockHeight=$(curl -s https://mempool.space/api/blocks/tip/height)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Write block height to file
|
- name: Write block height to file
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
env:
|
env:
|
||||||
BLOCK_HEIGHT: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
BLOCK_HEIGHT: ${{ steps.getBlockHeight.outputs.blockHeight }}
|
||||||
run: mkdir -p output && echo "$BLOCK_HEIGHT" > output/version.txt
|
run: mkdir -p output && echo "$BLOCK_HEIGHT" > output/version.txt
|
||||||
|
@ -104,14 +94,12 @@ jobs:
|
||||||
echo "Directory size is within the threshold $DIRECTORY_SIZE"
|
echo "Directory size is within the threshold $DIRECTORY_SIZE"
|
||||||
fi
|
fi
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
run: tar czf webui.tgz --strip-components=1 dist
|
run: tar czf webui.tgz --strip-components=1 dist
|
||||||
- name: Build LittleFS
|
- name: Build LittleFS
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
/tmp/mklittlefs/mklittlefs -c build_gz -s 410000 output/littlefs.bin
|
/tmp/mklittlefs/mklittlefs -c build_gz -s 410000 output/littlefs.bin
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
||||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
@ -119,7 +107,7 @@ jobs:
|
||||||
output/littlefs.bin
|
output/littlefs.bin
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
uses: https://code.forgejo.org/actions/forgejo-release@v2.5.1
|
uses: https://code.forgejo.org/actions/forgejo-release@v2.4.0
|
||||||
with:
|
with:
|
||||||
url: 'https://git.btclock.dev/'
|
url: 'https://git.btclock.dev/'
|
||||||
repo: '${{ github.repository }}'
|
repo: '${{ github.repository }}'
|
||||||
|
|
Loading…
Add table
Reference in a new issue