Skip to content

Instantly share code, notes, and snippets.

@elegantcoder
Last active March 4, 2022 14:15
Show Gist options
  • Save elegantcoder/711257d209221c534e58c221a8df47ba to your computer and use it in GitHub Desktop.
Save elegantcoder/711257d209221c534e58c221a8df47ba to your computer and use it in GitHub Desktop.
You can use while in workflow `steps.run`
name: using while in Github Workflow
on:
push:
branches:
- '**'
jobs:
test-loop:
timeout-minutes: 2
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: 'while'
run: |
while : ; do
git pull --rebase || break
git push && break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment