mirror of
https://github.com/nitezs/sub2sing-box.git
synced 2024-12-23 20:54:42 -05:00
mod workflow
This commit is contained in:
parent
82edf3d068
commit
d0bb03cd1e
51
.github/workflows/docker-dev.yaml
vendored
51
.github/workflows/docker-dev.yaml
vendored
@ -1,51 +0,0 @@
|
||||
name: Build and Push Docker(Dev)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9].[0-9].[0-9]-beta*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKER_HUB_USERNAME }}/sub2sing-box
|
||||
ghcr.io/${{ github.repository }}
|
||||
tags: dev
|
||||
|
||||
- name: Set up Docker buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image to GHCR and Docker Hub
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: version=${{ github.sha }}
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
49
.github/workflows/docker.yaml
vendored
49
.github/workflows/docker.yaml
vendored
@ -1,49 +0,0 @@
|
||||
name: Build and Push Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9].[0-9].[0-9]"
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ secrets.DOCKER_HUB_USERNAME }}/sub2sing-box
|
||||
ghcr.io/${{ github.repository }}
|
||||
|
||||
- name: Set up Docker buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image to GHCR and Docker Hub
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: version=${{ github.ref_name }}
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
31
.github/workflows/goreleaser-pre.yaml
vendored
31
.github/workflows/goreleaser-pre.yaml
vendored
@ -1,31 +0,0 @@
|
||||
name: Build and Release(Beta)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9].[0-9].[0-9]-beta*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21.5
|
||||
|
||||
- name: Run goreleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean -f .goreleaser.pre.yaml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
31
.github/workflows/goreleaser.yaml
vendored
31
.github/workflows/goreleaser.yaml
vendored
@ -1,31 +0,0 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9].[0-9].[0-9]"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21.5
|
||||
|
||||
- name: Run goreleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -27,8 +27,4 @@ archives:
|
||||
- README.md
|
||||
- templates
|
||||
release:
|
||||
prerelease: auto
|
||||
draft: true
|
||||
github:
|
||||
owner: nitezs
|
||||
name: sub2sing-box
|
||||
prerelease: true
|
||||
|
@ -26,7 +26,3 @@ archives:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- templates
|
||||
release:
|
||||
github:
|
||||
owner: nitezs
|
||||
name: sub2sing-box
|
||||
|
10
.woodspecker/docker-nightly.yml
Normal file
10
.woodspecker/docker-nightly.yml
Normal file
@ -0,0 +1,10 @@
|
||||
steps:
|
||||
- name: build
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386,linux/ppc64le,linux/s390x
|
||||
repo: nite07/sub2sing-box
|
||||
tag: nightly
|
||||
username: nite07
|
||||
password:
|
||||
from_secret: docker_password
|
13
.woodspecker/docker.yml
Normal file
13
.woodspecker/docker.yml
Normal file
@ -0,0 +1,13 @@
|
||||
when:
|
||||
event: tag
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/386,linux/ppc64le,linux/s390x
|
||||
repo: nite07/sub2sing-box
|
||||
tag: ${CI_COMMIT_TAG}
|
||||
username: nite07
|
||||
password:
|
||||
from_secret: docker_password
|
18
.woodspecker/release.yml
Normal file
18
.woodspecker/release.yml
Normal file
@ -0,0 +1,18 @@
|
||||
when:
|
||||
event: tag
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: goreleaser/goreleaser:latest
|
||||
commands:
|
||||
- goreleaser release --clean --skip publish
|
||||
- mkdir release
|
||||
- mv dist/*.tar.gz release/
|
||||
- mv dist/*.zip release/
|
||||
- name: release
|
||||
image: woodpeckerci/plugin-gitea-release
|
||||
settings:
|
||||
files: release/*
|
||||
api_key:
|
||||
from_secret: gitea_key
|
||||
base-url: https://git.nite07.com
|
Loading…
Reference in New Issue
Block a user