更新 .gitea/workflows/ci.yml
This commit is contained in:
parent
492ae87874
commit
02847c3b0b
|
@ -13,8 +13,6 @@ env:
|
||||||
HTTPS_PROXY: "http://172.17.0.1:7890"
|
HTTPS_PROXY: "http://172.17.0.1:7890"
|
||||||
GOPROXY: "https://goproxy.cn,direct"
|
GOPROXY: "https://goproxy.cn,direct"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build binary CI
|
name: Build binary CI
|
||||||
|
@ -24,7 +22,7 @@ jobs:
|
||||||
# 持久化工具目录
|
# 持久化工具目录
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://huoxue.link:12300/huoxue1/checkout@main
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: setup go
|
- name: setup go
|
||||||
|
@ -34,53 +32,16 @@ jobs:
|
||||||
- name: Fetch all tags
|
- name: Fetch all tags
|
||||||
run: git fetch --force --tags
|
run: git fetch --force --tags
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: https://github.com/goreleaser/goreleaser-action@v4
|
uses: https://huoxue.link:12300/huoxue1/goreleaser-action@master
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: build --rm-dist ${{ steps.snapshot.outputs.ARG }} --timeout 2h30m
|
args: build --snapshot
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
||||||
-
|
# - name: upload-artifact
|
||||||
name: Set up QEMU
|
# uses: actions/upload-artifact@v3
|
||||||
id: qemu
|
# with:
|
||||||
uses: docker/setup-qemu-action@v2
|
# name: my-artifact
|
||||||
-
|
# path: dist/*/*
|
||||||
name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
-
|
|
||||||
name: Check snapshot
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
||||||
id: snapshot
|
|
||||||
run: echo '::set-output name=ARG::--snapshot'
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: huoxue.link:12300/huoxue1/qinglong-go
|
|
||||||
tags: |
|
|
||||||
type=raw,value=latest
|
|
||||||
type=ref,event=tag
|
|
||||||
-
|
|
||||||
name: Docker Login
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: huoxue.link:12300
|
|
||||||
username: huoxue1
|
|
||||||
password: 1743224847gou
|
|
||||||
-
|
|
||||||
name: Build and push
|
|
||||||
id: docker_build
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
ulimit: core=0:0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue