From 42030003d3ff554d71fd419fed1274ddf2c8a444 Mon Sep 17 00:00:00 2001 From: Daniel Legt Date: Fri, 1 May 2026 03:39:33 +0300 Subject: [PATCH] feat(ci/cd): Implemented simple package publishing to registry --- .gitea/workflows/publish.yml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..29c8da2 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,45 @@ +name: Build and Publish Docker Image +run-name: Publishing ${{ gitea.ref_name }} + +on: + push: + tags: + - "v*" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: false + + - name: Run Tests + run: go test ./... + + - name: Install Docker + run: curl -fsSL https://get.docker.com | sh + + - name: Build Docker Image + run: | + docker build \ + -t tea.chunkbyte.com/kato/WarpBox:${{ gitea.ref_name }} \ + -t tea.chunkbyte.com/kato/WarpBox:latest \ + . + + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: tea.chunkbyte.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Push Docker Image + run: | + docker push tea.chunkbyte.com/kato/WarpBox:${{ gitea.ref_name }} + docker push tea.chunkbyte.com/kato/WarpBox:latest