25 lines
719 B
YAML
25 lines
719 B
YAML
name: Build and Push Docker Image
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.alwisp.com
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
run: |
|
|
docker build -t git.alwisp.com/${{ gitea.repository_owner }}/${{ gitea.repository }}:latest .
|
|
docker push git.alwisp.com/${{ gitea.repository_owner }}/${{ gitea.repository }}:latest |