Построение докер-образов в gitea
This commit is contained in:
@@ -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}}'
|
|
||||||
65
.gitea/workflows/release.yml
Normal file
65
.gitea/workflows/release.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user