2 Commits

Author SHA1 Message Date
Dave Gallant
c545a5a8c8 Fix gitea ansible job 2023-12-29 00:00:46 -05:00
Dave Gallant
4d5ddf6d44 Remove callout to gitlab 2023-12-28 23:05:33 -05:00
2 changed files with 8 additions and 16 deletions

View File

@@ -191,22 +191,18 @@ jobs:
options: |
--inventory inventory
--limit ${{ matrix.host }}
send-failure-notification:
needs: run-ansible-playbook
runs-on: ubuntu-latest
if: always() && failure()
steps:
- name: Send failure notification
uses: dawidd6/action-send-mail@v3
if: always() && failure()
with:
server_address: smtp.gmail.com
server_port: 465
secure: true
username: myuser
password: ${{ secrets.MAIL_PASSWORD }}
subject: gitea job ${{github.repository}} failed!
subject: ansible runbook '${{ matrix.host }}' failed
to: me@davegallant.ca
from: Gitea
from: RFD Notify
body: |
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}
```
@@ -223,6 +219,6 @@ One enhancement that I would like to see is the ability to send notifications on
## Conclusion
Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources (ahem, gitlab). It likely helps that the codebase is largely written in go.
Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources. It likely helps that the codebase is largely written in go.
By combining gitea with the networking marvel that is tailscale, running workflows becomes simple and fun. Whether you are working on a team or working alone, this setup ensures that your workflows are securely accessible from anywhere with an internet connection.

View File

@@ -232,22 +232,18 @@
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">options</span><span style="color:#eceff4">:</span> <span style="color:#eceff4">|</span><span style="color:#616e87">
</span></span></span><span style="display:flex;"><span><span style="color:#616e87"> --inventory inventory
</span></span></span><span style="display:flex;"><span><span style="color:#616e87"> --limit ${{ matrix.host }}</span>
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">send-failure-notification</span><span style="color:#eceff4">:</span>
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">needs</span><span style="color:#eceff4">:</span> run-ansible-playbook
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">runs-on</span><span style="color:#eceff4">:</span> ubuntu-latest
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">if</span><span style="color:#eceff4">:</span> always() &amp;&amp; failure()
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">steps</span><span style="color:#eceff4">:</span>
</span></span><span style="display:flex;"><span> - <span style="color:#81a1c1">name</span><span style="color:#eceff4">:</span> Send failure notification
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">uses</span><span style="color:#eceff4">:</span> dawidd6/action-send-mail@v3
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">if</span><span style="color:#eceff4">:</span> always() &amp;&amp; failure()
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">with</span><span style="color:#eceff4">:</span>
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">server_address</span><span style="color:#eceff4">:</span> smtp.gmail.com
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">server_port</span><span style="color:#eceff4">:</span> <span style="color:#b48ead">465</span>
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">secure</span><span style="color:#eceff4">:</span> <span style="color:#81a1c1;font-weight:bold">true</span>
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">username</span><span style="color:#eceff4">:</span> myuser
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">password</span><span style="color:#eceff4">:</span> ${{ secrets.MAIL_PASSWORD }}
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">subject</span><span style="color:#eceff4">:</span> gitea job ${{github.repository}} failed!
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">subject</span><span style="color:#eceff4">:</span> ansible runbook &#39;${{ matrix.host }}&#39; failed
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">to</span><span style="color:#eceff4">:</span> me@davegallant.ca
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">from</span><span style="color:#eceff4">:</span> Gitea
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">from</span><span style="color:#eceff4">:</span> RFD Notify
</span></span><span style="display:flex;"><span> <span style="color:#81a1c1">body</span><span style="color:#eceff4">:</span> <span style="color:#eceff4">|</span><span style="color:#616e87">
</span></span></span><span style="display:flex;"><span><span style="color:#616e87"> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }}</span>
</span></span></code></pre></div><p>And voilà:</p>
@@ -259,7 +255,7 @@
<h2 id="areas-for-improvement">Areas for improvement<a href="#areas-for-improvement" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>One enhancement that I would like to see is the ability to send notifications on workflow failures. Currently, this <a href="https://github.com/go-gitea/gitea/issues/23725">doesn&rsquo;t seem possible</a> without adding logic to each workflow.</p>
<h2 id="conclusion">Conclusion<a href="#conclusion" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources (ahem, gitlab). It likely helps that the codebase is largely written in go.</p>
<p>Gitea Actions are fast and the resource footprint is minimal. My gitea instance is currently using around 250mb of memory and a small fraction of a single cpu core (and the runner is using a similar amount of resources). This is impressive since many alternatives tend to require substantially more resources. It likely helps that the codebase is largely written in go.</p>
<p>By combining gitea with the networking marvel that is tailscale, running workflows becomes simple and fun. Whether you are working on a team or working alone, this setup ensures that your workflows are securely accessible from anywhere with an internet connection.</p></section>
<script