diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..f50506f --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,32 @@ +name: Docker +run-name: Build and Publish Service +runs-on: ubuntu-latest +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - + name: Set Environment Variables + id: vars + env: + repository: ${{gitea.repository}} + ref_name: ${{gitea.ref_name}} + run: | + echo $repository + echo ::set-output name=OWNER::${repository#/*} + echo ::set-output name=PROJECT::${repository#*/} + echo $ref_name + echo ::set-output name=TAG::${ref_name#refs/*/} + - + name: Push Image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: 192.168.1.2:5000/${{gitea.repository}}:${{steps.vars.outputs.TAG}}