aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBraxton Hall2022-10-28 20:06:19 +0000
committerGitHub2022-10-28 20:06:19 +0000
commit655b211bef28aff53605783ab4dcce70579b1eed (patch)
treee8ed5d34690a6c5e7ae8c838f9fdae905e7f1dfd /.github
parent85d2dbd9bbbb03fda8acd2bf1d39be9174bd8601 (diff)
parent241215f49f7a0ffaf10c694d8fa8b68934d3c516 (diff)
Merge pull request #66 from braxtonhall/nick
Add fib workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/fib.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/fib.yml b/.github/workflows/fib.yml
new file mode 100644
index 0000000..ca1e591
--- /dev/null
+++ b/.github/workflows/fib.yml
@@ -0,0 +1,33 @@
+name: fib
+on:
+ push:
+ branches: [ "main" ]
+ workflow_dispatch:
+
+jobs:
+ compute:
+ runs-on: ubuntu-latest
+ steps:
+ - name: sum
+ shell: bash
+ run: |
+ prev_fib=${{ secrets.PREV_FIB_NUM }}
+ curr_fib=${{ secrets.CURR_FIB_NUM }}
+ next_fib=$((${prev_fib:-0} + ${curr_fib:-1}))
+ echo "prev=$curr_fib" >> $GITHUB_ENV
+ echo "curr=$next_fib" >> $GITHUB_ENV
+ - uses: gliech/create-github-secret-action@v1
+ with:
+ name: PREV_FIB_NUM
+ value: ${{ env.prev }}
+ pa_token: ${{ secrets.PA_TOKEN }}
+ - uses: gliech/create-github-secret-action@v1
+ with:
+ name: CURR_FIB_NUM
+ value: ${{ env.curr }}
+ pa_token: ${{ secrets.PA_TOKEN }}
+ - name: Create commit comment
+ uses: peter-evans/commit-comment@v2
+ with:
+ body: |
+ Your Fibonacci number is ${{ env.curr }}.