This commit is contained in:
davegallant
2026-01-02 00:21:13 +00:00
parent 19c1c61f9e
commit f0321eb6bb
87 changed files with 88 additions and 88 deletions

View File

@@ -60,7 +60,7 @@ After registering this runner and starting the daemon, the runner appeared in /a
Running a workflow# Now it’s time start running some automation. I used the demo workflow as a starting point to verify that the runner is executing workflows.
After this, I wanted to make sure that some of my existing workflows could be migrated over.
The following workflow uses a matrix to run a job for several of my hosts using ansible playbooks that will do various tasks such as patching os updates and updating container images.
name: Run ansible on: push: schedule: - cron: "0 */12 * * *" jobs: run-ansible-playbook: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: Install ansible run: | apt update && apt install ansible -y - name: Run playbook uses: dawidd6/action-ansible-playbook@v2 with: playbook: playbooks/main.yml requirements: requirements.yml options: | --inventory inventory - 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: ansible runbook failed to: me@davegallant.ca from: RFD Notify body: | \${{ github.server_url }}/\${{ github.repository }}/actions/runs/\${{ github.run_number }} And voil\xE0:
name: Run ansible on: push: schedule: - cron: "0 */12 * * *" jobs: run-ansible-playbook: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: Install ansible run: | apt update && apt install ansible -y - name: Run playbook uses: dawidd6/action-ansible-playbook@v2 with: playbook: playbooks/main.yml requirements: requirements.yml options: | --inventory inventory - 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: ansible runbook failed to: me@davegallant.ca from: RFD Notify body: | \${{ github.server_url }}/\${{ github.repository }}/actions/runs/\${{ github.run_number }} And the end result:
You may be wondering how the gitea runner is allowed to connect to the other hosts using ansible? Well, the nodes are in the same tailnet and have tailscale ssh enabled.
Areas for improvement# One enhancement that I would like to see is the ability to send notifications on workflow failures. Currently, this doesn’t seem possible without adding logic to each workflow.
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. It likely helps that the codebase is largely written in go.