From 14c251f3e43be3bbf96cedf49c00361d755574f2 Mon Sep 17 00:00:00 2001 From: Anthony Axenov Date: Fri, 21 Nov 2025 22:25:06 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=81=D1=82=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BE=D0=BA=D0=B5=D1=80-=D0=BE?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=B7=D0=BE=D0=B2=20=D0=B2=20gitea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release-tag.yml | 28 -------------- .gitea/workflows/release.yml | 65 ++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 28 deletions(-) delete mode 100644 .gitea/workflows/release-tag.yml create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release-tag.yml b/.gitea/workflows/release-tag.yml deleted file mode 100644 index 3bdf5e6..0000000 --- a/.gitea/workflows/release-tag.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: release - -on: - push: - tags: - - 'v*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - name: Checkout - with: - fetch-depth: 0 - - name: Setup go - uses: https://github.com/actions/setup-go@v4 - with: - go-version: '>=1.23.6' - - name: Compile - run: make release - - name: Make release - id: use-go-action - uses: https://gitea.com/actions/release-action@main - with: - files: |- - bin/*.zip - api_key: '${{secrets.RELEASE_TOKEN}}' diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..d3d391d --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,65 @@ +# https://docs.gitea.com/usage/actions/overview +# https://docs.github.com/ru/actions/reference/workflows-and-actions/contexts + +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: # https://github.com/actions/checkout + fetch-depth: 0 + + - name: Set up go + uses: actions/setup-go@v4 + with: # https://github.com/actions/setup-go + go-version: '>=1.24.2' + + - name: Build release files (amd64) + run: make release ARCH=amd64 + + - name: Build release files (arm64) + run: make release ARCH=arm64 + + - name: Create new release + id: use-go-action + uses: https://gitea.com/actions/gitea-release-action@main + with: # https://gitea.com/actions/gitea-release-action + server_url: https://git.axenov.dev + token: '${{secrets.RELEASE_TOKEN}}' + files: |- + bin/*.zip + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: # https://github.com/docker/setup-buildx-action + build-args: "IPTVC_VERSION=${{ github.ref_name }}" + buildkitd-config-inline: | + # https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md + [ registry."docker.io" ] + mirrors = ["https://dockerhub.timeweb.cloud", "https://dh-mirror.gitverse.ru"] + http = true + insecure = true + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: # https://github.com/docker/login-action + registry: git.axenov.dev + username: ${{ secrets.USERNAME }} + password: ${{ secrets.RELEASE_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v5 + with: # https://github.com/docker/build-push-action + context: . + push: true + tags: | + git.axenov.dev/iptv/iptvc:${{ github.ref_name }} + git.axenov.dev/iptv/iptvc:latest