From 241215f49f7a0ffaf10c694d8fa8b68934d3c516 Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Fri, 28 Oct 2022 13:05:06 -0700 Subject: Add fib workflow --- .github/workflows/fib.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/fib.yml (limited to '.github/workflows') 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 }}. -- cgit v1.2.3-70-g09d2