:contruction: Trying to make a docker build action
This commit is contained in:
parent
923fd5cd31
commit
63f2af9661
1 changed files with 36 additions and 0 deletions
36
.gitea/workflows/build-image.yaml
Normal file
36
.gitea/workflows/build-image.yaml
Normal 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
|
Loading…
Reference in a new issue