28 lines
662 B
YAML
28 lines
662 B
YAML
name: default
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: my-runner
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REGISTRY_URL }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.AUTH_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
docker build -t ${{ vars.REGISTRY_URL }}/${{ github.repository }}:latest .
|
|
|
|
- name: Push Docker Image
|
|
run: |
|
|
docker push ${{ vars.REGISTRY_URL }}/${{ github.repository }}:latest |