aboutsummaryrefslogtreecommitdiff
path: root/content/notes/cronjobs-github-with-actions.md
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-07-16 22:46:06 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-07-16 22:46:11 +0200
commit0cb6a5c81271a61e930505f3315b1d67bdf22724 (patch)
tree27df39e2004dda656f5e8ae09e9d4e6395d4f903 /content/notes/cronjobs-github-with-actions.md
parent89b2019bfa3bd8f1f0ceb7724c492fdf337dd519 (diff)
downloadmitjafelicijan.com-0cb6a5c81271a61e930505f3315b1d67bdf22724.tar.gz
Renamed all the notes files to include date
Diffstat (limited to 'content/notes/cronjobs-github-with-actions.md')
-rw-r--r--content/notes/cronjobs-github-with-actions.md33
1 files changed, 0 insertions, 33 deletions
diff --git a/content/notes/cronjobs-github-with-actions.md b/content/notes/cronjobs-github-with-actions.md
deleted file mode 100644
index b28e4a9..0000000
--- a/content/notes/cronjobs-github-with-actions.md
+++ /dev/null
@@ -1,33 +0,0 @@
1---
2title: "Cronjobs on Github with Github Actions"
3url: cronjobs-github-with-actions.html
4date: 2023-05-27T00:35:36+02:00
5type: note
6draft: false
7tags: [github]
8---
9
10In the root of your repository create a folder `.github/workflows` and in that
11folder create a file a file `cron.yaml`. This file can be named whatever you
12wish. But it has to be a `yaml` file.
13
14File below (`.github/workflows/cron.yaml`) describes an action that will trigger
15every six hours and it will curl example.com.
16
17However. Be sure that you have enough credits. Free account is not that generous
18with the minutes they give you for free. Check more about GitHub Actions usage
19on their website https://docs.github.com/en/actions.
20
21```yaml
22# .github/workflows/cron.yaml
23name: Do a curl every 6 hours
24on:
25 schedule:
26 - cron: '0 */6 * * *'
27jobs:
28 cron:
29 runs-on: ubuntu-latest
30 steps:
31 - name: Call some url
32 run: curl 'https://example.com'
33```