36 lines
851 B
YAML
36 lines
851 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.GITEA_TOKEN}}
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: git.kucharczyk.xyz/${{ gitea.repository_owner }}/containers/gitea:latest
|
|
|
|
env:
|
|
DOCKER_USERNAME: ${{ gitea.repository_owner }}
|
|
DOCKER_PASSWORD: ${{ secrets.GITEA_TOKEN}}
|