Publish when tagging
This commit is contained in:
parent
061e0b05b4
commit
61fea30ada
35
.gitea/workflows/publish.yaml
Normal file
35
.gitea/workflows/publish.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Build docker image
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Build
|
||||||
|
run-name: ${{ gitea.actor }} running CI in the pipeline 🚀
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: cth-ubuntu-latest
|
||||||
|
if: gitea.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up docker buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: |
|
||||||
|
network=giteanet
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and (do not) push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
env:
|
||||||
|
ACTIONS_RUNTIME_TOKEN: ''
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: zeguigui/open-report-analyzer:${{ gitea.ref_name }}
|
Loading…
Reference in New Issue
Block a user