48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
# Gitea
|
|
|
|
Gitea runner's function exactly the same as GitHub runners. They're just stored in the .gitea folder instead of .github folder.
|
|
|
|
## Ramblingcoder Gitea
|
|
|
|
There is a private Gitea repository that docker images are pushed too. This is an example of a gitea action that creates and pushes an image.
|
|
|
|
The image `gitea-runner-custom-image` has docker and docker-compose pre-installed.
|
|
|
|
```yaml
|
|
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: git.ramblingcoder.com/ramblingcoder/gitea-runner-custom-image:latest
|
|
credentials:
|
|
username: ${{ secrets.GIT_USERNAME }}
|
|
password: ${{ secrets.GIT_PASSWORD }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Docker Registry
|
|
uses: https://git.ramblingcoder.com/Mirror.Actions/docker-login-action@v3
|
|
with:
|
|
registry: git.ramblingcoder.com
|
|
username: ${{ secrets.GIT_USERNAME }}
|
|
password: ${{ secrets.GIT_PASSWORD }}
|
|
|
|
- name: Build Image
|
|
run: |
|
|
docker build -t git.ramblingcoder.com/ramblingcoder/REPLACETHIS -f docker/Dockerfile .
|
|
|
|
- name: Push Image
|
|
run: docker push git.ramblingcoder.com/ramblingcoder/REPLACETHIS
|
|
```
|