|
| 1 | +name: Run Setup Script |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main # Trigger on pushes to the main branch |
| 7 | + |
| 8 | +jobs: |
| 9 | + bitcoin-setup: |
| 10 | + runs-on: ubuntu-latest # Use the latest Ubuntu environment |
| 11 | + |
| 12 | + steps: |
| 13 | + - name: Checkout repository |
| 14 | + uses: actions/checkout@v4 # Check out the repository code |
| 15 | + |
| 16 | + - name: Setup Bitcoin Core |
| 17 | + run: | |
| 18 | + sudo bash .github/setup.sh |
| 19 | +
|
| 20 | + - name: Get latest block in signet mode |
| 21 | + run: | |
| 22 | + bitcoin-cli getblockhash 243833 |
| 23 | +
|
| 24 | + - name: 01.sh - Verify Hash Block |
| 25 | + run: | |
| 26 | + chmod +x submission/01.sh |
| 27 | + HASH=$(submission/01.sh) |
| 28 | + if [[ "$HASH" == "000000b024f11595795f0be5974229f786df389c8b92e92b61890e9e3c6b8d8a" ]]; then |
| 29 | + echo "✅ Success: Verify Hash Block passed!" |
| 30 | + else |
| 31 | + echo "❌ Error: Verify Hash Block failed!" |
| 32 | + exit 1 |
| 33 | + fi |
| 34 | +
|
| 35 | + - name: 02.sh - Verify Input Count |
| 36 | + run: | |
| 37 | + chmod +x submission/02.sh |
| 38 | + COUNT=$(submission/02.sh) |
| 39 | + if [[ "$COUNT" == "442" ]]; then |
| 40 | + echo "✅ Success: Input Count verification passed!" |
| 41 | + else |
| 42 | + echo "❌ Error: Input Count verification failed!" |
| 43 | + exit 1 |
| 44 | + fi |
| 45 | + |
| 46 | + - name: 03.sh - Verify Transaction |
| 47 | + run: | |
| 48 | + chmod +x submission/03.sh |
| 49 | + TX=$(submission/03.sh) |
| 50 | + EXPECTED=0e302b600d32b86c3362647f422e5605165a1e5c89c760d0d972e102f390c84e |
| 51 | + if [[ "$TX" == "$EXPECTED" ]]; then |
| 52 | + echo "✅ Success: Transaction verification passed!" |
| 53 | + else |
| 54 | + echo "❌ Error: Transaction verification failed!" |
| 55 | + exit 1 |
| 56 | + fi |
| 57 | + |
| 58 | + - name: 04.sh - Verify Public Key Signer |
| 59 | + run: | |
| 60 | + chmod +x submission/04.sh |
| 61 | + PUBKEY=$(submission/04.sh) |
| 62 | + EXPECTED_OUTPUT=02c6c9306ade30f9711c9503cdaa94094efc025acb9be7845acc49e1cb475952c6 |
| 63 | + if [[ "$PUBKEY" == "$EXPECTED_OUTPUT" ]]; then |
| 64 | + echo "✅ Success: Public Key Signer verification passed!" |
| 65 | + else |
| 66 | + echo "❌ Error: Public Key Signer verification failed!" |
| 67 | + exit 1 |
| 68 | + fi |
| 69 | + |
| 70 | + - name: 05.sh - Verify TX Fee |
| 71 | + run: | |
| 72 | + chmod +x submission/05.sh |
| 73 | + FEE=$(submission/05.sh) |
| 74 | + if [[ "$FEE" == "696" ]]; then |
| 75 | + echo "✅ Success: TX Fee verification passed!" |
| 76 | + else |
| 77 | + echo "❌ Error: TX Fee verification failed!" |
| 78 | + exit 1 |
| 79 | + fi |
| 80 | +
|
| 81 | + - name: 06.sh - Verify TX Fee |
| 82 | + run: | |
| 83 | + chmod +x submission/06.sh |
| 84 | + FEE=$(submission/06.sh) |
| 85 | + if [[ "$FEE" == "696" ]]; then |
| 86 | + echo "✅ Success: TX Fee verification passed!" |
| 87 | + else |
| 88 | + echo "❌ Error: TX Fee verification failed!" |
| 89 | + exit 1 |
| 90 | + fi |
| 91 | +
|
| 92 | + - name: 07.sh - Verify Coinbase TX |
| 93 | + run: | |
| 94 | + chmod +x submission/07.sh |
| 95 | + COINBASE=$(submission/07.sh) |
| 96 | + EXPECTED_OUTPUT=7ab200e41b53d974f757535c01a715aae6b1322a30753c1d2b0ea201500bc060 |
| 97 | + if [[ "$COINBASE" == "$EXPECTED_OUTPUT" ]]; then |
| 98 | + echo "✅ Success: Coinbase TX verification passed!" |
| 99 | + else |
| 100 | + echo "❌ Error: Coinbase TX verification failed!" |
| 101 | + exit 1 |
| 102 | + fi |
| 103 | +
|
| 104 | + - name: 08.sh - Verify TX Block Height |
| 105 | + run: | |
| 106 | + chmod +x submission/08.sh |
| 107 | + HEIGHT=$(submission/08.sh) |
| 108 | + if [[ "$HEIGHT" == "243859" ]]; then |
| 109 | + echo "✅ Success: TX Block Height verification passed!" |
| 110 | + else |
| 111 | + echo "❌ Error: TX Block Height verification failed!" |
| 112 | + exit 1 |
| 113 | + fi |
0 commit comments