29 lines
No EOL
882 B
YAML
29 lines
No EOL
882 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Container Registry
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.avatic.de -u "${{ gitea.actor }}" --password-stdin
|
|
|
|
- name: Build and push
|
|
run: |
|
|
docker build -t git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} .
|
|
docker tag git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }} git.avatic.de/${{ gitea.repository_owner }}/lcc:latest
|
|
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:${{ gitea.sha }}
|
|
docker push git.avatic.de/${{ gitea.repository_owner }}/lcc:latest |