:contruction: Trying to make a docker build action

This commit is contained in:
Maxim Lebedev 2023-11-03 22:35:22 +06:00
parent 923fd5cd31
commit 63f2af9661
Signed by: toby3d
GPG key ID: 1F14E25B7C119FC5

View file

@ -0,0 +1,36 @@
---
name: Create and publish a Docker image
on:
publish:
branches:
- master
- develop
- release
push:
tags:
- v*
env:
REGISTRY: source.toby3d.me
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-image:
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: toby3d
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: user/app:latest