mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
feat: dev docker
This commit is contained in:
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -4,6 +4,8 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -33,7 +35,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch IPInfo GeoIP Database
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
|
||||
run: |
|
||||
@@ -81,6 +83,7 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Release
|
||||
if: contains(github.ref, 'refs/tags/')
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "assets/*/*/*.zip"
|
||||
@@ -99,6 +102,7 @@ jobs:
|
||||
curl -s https://purge.jsdelivr.net/gh/$LOWER_USERNAME/nezha@master/script/config.yaml
|
||||
|
||||
- name: Trigger sync
|
||||
if: contains(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
@@ -108,7 +112,7 @@ jobs:
|
||||
|
||||
release-docker:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
if: github.event_name == 'push'
|
||||
needs: build
|
||||
name: Release Docker images
|
||||
steps:
|
||||
@@ -124,12 +128,26 @@ jobs:
|
||||
chmod -R +x ./assets/*
|
||||
mkdir dist
|
||||
mv ./assets/*/*/* ./dist
|
||||
|
||||
- name: prepare frontend dists
|
||||
run: |
|
||||
wget https://github.com/nezhahq/nezha-dashboard/releases/download/v0.0.2/dist.zip
|
||||
unzip dist.zip
|
||||
mv dist admin-dist
|
||||
|
||||
- name: Extract branch name
|
||||
- name: Extract branch name in tag
|
||||
if: contains(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})
|
||||
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
|
||||
id: extract_branch
|
||||
|
||||
- name: Extract branch name in branch
|
||||
if: not(contains(github.ref, 'refs/tags/'))
|
||||
run: |
|
||||
export TAG_NAME=$(echo ${GITHUB_REF#refs/heads/})
|
||||
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
|
||||
id: extract_branch
|
||||
|
||||
- name: Log into GHCR
|
||||
uses: docker/login-action@master
|
||||
|
||||
Reference in New Issue
Block a user