ci(docker): add autobuild dockerimages
Some checks failed
Checks / check (push) Successful in 1m33s
Build and Push Docker Image / Build and Push Image (push) Failing after 29s

This commit is contained in:
Vladimir Rubin 2024-11-28 10:04:46 +02:00
parent 2843373476
commit 0bcab39fe5
Signed by: vavakado
GPG key ID: CAB744727F36B524

View file

@ -0,0 +1,33 @@
name: Build and Push Docker Image
on:
push:
branches:
- main # Change this to your default branch if different
jobs:
build:
name: Build and Push Image
runs-on: ubuntu-latest # This specifies the environment for the job
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.haientus.duckdns.org # Replace with your Docker registry URL
username: ${{ gitea.actor }} # The actor who triggered the action
password: ${{ secrets.REGISTRY_TOKEN }} # Your registry token secret
- name: Build Docker Image
run: |
TODAY=$(date +'%Y-%m-%d')
docker build -t gitea.haientus.duckdns.org/${{ gitea.repository_owner }}/exmr:${TODAY} .
docker tag gitea.haientus.duckdns.org/${{ gitea.repository_owner }}/exmr:${TODAY} gitea.haientus.duckdns.org/${{ gitea.repository_owner }}/exmr:latest
- name: Push Docker Image
run: |
docker push gitea.haientus.duckdns.org/${{ gitea.repository_owner }}/exmr:${TODAY}
docker push gitea.haientus.duckdns.org/${{ gitea.repository_owner }}/exmr:latest