1.4 KiB
1.4 KiB
How to use CICD on gitea
In this example we create an example project with a simple cicd. The CICD will be run when you push the project
Procedure
- create a project in gitea
- clone it on local pc
- goto project folder on local
- create folder
.gitea/workflows - create
README.mdfile - create file
gitea-ci.ymlon the foder create above with the next content:
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- main
# efinition of the job(s)
jobs:
test-runner:
# Indicates on which runner label to run the job (must match one of the labels defined in the runner)
runs-on: [ubuntu-latest]
steps:
- name: Check runner
run: |
echo "✅ The runner is working properly!"
echo "User running this job : $(whoami)"
echo "Contents of current directory :"
ls -la
- name: Test Docker
run: |
echo "🐳 Checking Docker in the runner"
docker version || echo "⚠️ Docker not accessible in this runner"
- name: Network test
run: |
echo "🌐 Testing the connection to gitea.io"
curl -I https://gitea.io || echo "⚠️ Unable to contact gitea.io"
git add .
git commit -m "first commit`
git push
To see the CICD click on Actions in your project