2023-09-11 15:19:18 +00:00
|
|
|
name: Build and Push Docker Image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-09-10 13:21:13 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-09-11 15:19:18 +00:00
|
|
|
build-and-push:
|
2023-09-10 13:21:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-09-11 15:31:31 +00:00
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
2023-09-11 15:19:18 +00:00
|
|
|
|
2023-09-10 13:21:13 +00:00
|
|
|
steps:
|
2023-09-11 15:19:18 +00:00
|
|
|
- name: Checkout Repository
|
2023-09-10 13:21:13 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-09-11 15:19:18 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2023-09-11 15:24:33 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2023-09-11 15:19:18 +00:00
|
|
|
|
2023-09-11 15:24:33 +00:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ gitea.repository_owner }}
|
|
|
|
password: ${{ secrets.GITEA_TOKEN}}
|
2023-09-11 15:19:18 +00:00
|
|
|
|
2023-09-11 15:24:33 +00:00
|
|
|
- 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
|
2023-09-11 15:19:18 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
DOCKER_USERNAME: ${{ gitea.repository_owner }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.GITEA_TOKEN}}
|