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