mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
Revert "ci: comment out costly things (#4)"
This reverts commit 3168055948
.
This commit is contained in:
parent
3cce7ebf01
commit
6ae78b13a2
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@ -17,8 +17,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
#schedule:
|
schedule:
|
||||||
# - cron: '15 20 * * 0'
|
- cron: '15 20 * * 0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
67
.github/workflows/release.yml
vendored
67
.github/workflows/release.yml
vendored
@ -12,23 +12,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
goos: [
|
goos: [linux, windows]
|
||||||
linux,
|
|
||||||
#windows
|
|
||||||
]
|
|
||||||
goarch: [amd64]
|
goarch: [amd64]
|
||||||
#include:
|
include:
|
||||||
# - goos: linux
|
- goos: linux
|
||||||
# goarch: s390x
|
goarch: s390x
|
||||||
# - goos: linux
|
- goos: linux
|
||||||
# goarch: arm64
|
goarch: arm64
|
||||||
|
|
||||||
name: Build artifacts
|
name: Build artifacts
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
#container:
|
container:
|
||||||
# image: goreleaser/goreleaser-cross:v1.23
|
image: goreleaser/goreleaser-cross:v1.23
|
||||||
steps:
|
steps:
|
||||||
# - run: git config --global --add safe.directory /__w/nezha/nezha
|
- run: git config --global --add safe.directory /__w/nezha/nezha
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Fetch IPInfo GeoIP Database
|
- name: Fetch IPInfo GeoIP Database
|
||||||
@ -54,9 +51,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
GOARM: ${{ matrix.goarm }}
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: "~> v2"
|
version: '~> v2'
|
||||||
args: build --single-target --clean --skip=validate
|
args: build --single-target --clean --skip=validate
|
||||||
|
|
||||||
- name: Build snapshot
|
- name: Build snapshot
|
||||||
@ -65,23 +63,18 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
GOARM: ${{ matrix.goarm }}
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: "~> v2"
|
version: '~> v2'
|
||||||
args: build --single-target --clean --skip=validate --snapshot
|
args: build --single-target --clean --skip=validate --snapshot
|
||||||
|
|
||||||
# - name: Upload artifacts
|
- name: Upload artifacts
|
||||||
# uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: dashboard-${{ matrix.goos }}-${{ matrix.goarch }}
|
name: dashboard-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
# path: |
|
path: |
|
||||||
# ./dist/*/*
|
./dist/*/*
|
||||||
|
|
||||||
- name: Send artifacts to self-hosted storage
|
|
||||||
env:
|
|
||||||
NBFV: ${{ secrets.NBFV }}
|
|
||||||
run: |
|
|
||||||
curl -u $NBFV -F "file=@dist/linux_amd64_linux_amd64_v1/dashboard-linux-amd64" -F "filename=dashboard-linux-amd64" https://fv.naibahq.com/upload
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -141,7 +134,6 @@ jobs:
|
|||||||
- uses: robinraju/release-downloader@v1
|
- uses: robinraju/release-downloader@v1
|
||||||
with:
|
with:
|
||||||
repository: nezhahq/admin-frontend
|
repository: nezhahq/admin-frontend
|
||||||
token: ${{ secrets.PAT }}
|
|
||||||
fileName: dist.zip
|
fileName: dist.zip
|
||||||
latest: true
|
latest: true
|
||||||
extract: true
|
extract: true
|
||||||
@ -161,17 +153,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mv dist user-dist
|
mv dist user-dist
|
||||||
|
|
||||||
# - name: Download artifacts
|
- name: Download artifacts
|
||||||
# uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# path: ./assets
|
path: ./assets
|
||||||
|
|
||||||
- name: Download artifacts to self-hosted storage
|
|
||||||
env:
|
|
||||||
NBFV: ${{ secrets.NBFV }}
|
|
||||||
run: |
|
|
||||||
mkdir -p ./assets/a/b
|
|
||||||
curl -u $NBFV -o ./assets/a/b/dashboard-linux-amd64 https://fv.naibahq.com/download?filename=dashboard-linux-amd64
|
|
||||||
|
|
||||||
- name: Fix permissions
|
- name: Fix permissions
|
||||||
run: |
|
run: |
|
||||||
@ -212,8 +197,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up image name
|
- name: Set up image name
|
||||||
run: |
|
run: |
|
||||||
GHCR_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
|
GHCR_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha" | tr '[:upper:]' '[:lower:]')
|
||||||
if [ ${{ github.repository_owner }} = "naiba" ]
|
if [ ${{ github.repository_owner }} = "nezhahq" ]
|
||||||
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/nezhahq/nezha-dashboard")
|
then ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/nezhahq/nezha-dashboard")
|
||||||
else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
|
else ALI_IMAGE_NAME=$(echo "registry.cn-shanghai.aliyuncs.com/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
|
||||||
fi
|
fi
|
||||||
@ -241,7 +226,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64,linux/arm64,linux/s390x
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ steps.image-name.outputs.GHCR_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}
|
${{ steps.image-name.outputs.GHCR_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}
|
||||||
|
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@ -1,13 +1,13 @@
|
|||||||
name: Run Tests
|
name: Run Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
#push:
|
push:
|
||||||
# paths:
|
paths:
|
||||||
# - "**.go"
|
- "**.go"
|
||||||
# - "go.mod"
|
- "go.mod"
|
||||||
# - "go.sum"
|
- "go.sum"
|
||||||
# - "resource/**"
|
- "resource/**"
|
||||||
# - ".github/workflows/test.yml"
|
- ".github/workflows/test.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
Loading…
Reference in New Issue
Block a user