update workflow
This commit is contained in:
18
.github/workflows/build-binary.yaml
vendored
18
.github/workflows/build-binary.yaml
vendored
@@ -12,15 +12,15 @@ jobs:
|
|||||||
working-directory: web
|
working-directory: web
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
- name: Setup bun
|
- name: Setup bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: bf1942/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: bf1942/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Build Frontend
|
- name: Build Frontend
|
||||||
run: bun run build
|
run: bun run build
|
||||||
- name: Upload Web Build Artifact
|
- name: Upload Web Build Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: bf1942/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: web-build
|
name: web-build
|
||||||
path: web/build
|
path: web/build
|
||||||
@@ -67,22 +67,22 @@ jobs:
|
|||||||
name: bili-sync-rs-Windows-x86_64.zip
|
name: bili-sync-rs-Windows-x86_64.zip
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Download Web Build Artifact
|
- name: Download Web Build Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: bf1942/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: web-build
|
name: web-build
|
||||||
path: web/build
|
path: web/build
|
||||||
- name: Read Toolchain Version
|
- name: Read Toolchain Version
|
||||||
uses: SebRollen/toml-action@v1.2.0
|
uses: bf1942/toml-action@v1.2.0
|
||||||
id: read_rust_toolchain
|
id: read_rust_toolchain
|
||||||
with:
|
with:
|
||||||
file: rust-toolchain.toml
|
file: rust-toolchain.toml
|
||||||
field: toolchain.channel
|
field: toolchain.channel
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
uses: houseabsolute/actions-rust-cross@v1
|
uses: bf1942/actions-rust-cross@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
target: ${{ matrix.platform.target }}
|
target: ${{ matrix.platform.target }}
|
||||||
@@ -99,7 +99,7 @@ jobs:
|
|||||||
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
|
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
|
||||||
fi
|
fi
|
||||||
- name: Upload release artifact
|
- name: Upload release artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: bf1942/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: bili-sync-rs-${{ matrix.platform.release_for }}
|
name: bili-sync-rs-${{ matrix.platform.release_for }}
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
8
.github/workflows/build-doc.yaml
vendored
8
.github/workflows/build-doc.yaml
vendored
@@ -16,15 +16,15 @@ jobs:
|
|||||||
working-directory: docs
|
working-directory: docs
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
- name: Setup bun
|
- name: Setup bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: bf1942/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: bf1942/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Build documentation
|
- name: Build documentation
|
||||||
run: bun run docs:build
|
run: bun run docs:build
|
||||||
- name: Deploy Github Pages
|
- name: Deploy Github Pages
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
uses: bf1942/actions-gh-pages@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: docs/.vitepress/dist
|
publish_dir: docs/.vitepress/dist
|
||||||
|
|||||||
8
.github/workflows/pr-check.yaml
vendored
8
.github/workflows/pr-check.yaml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- run: rustup install && rustup component add rustfmt --toolchain nightly
|
- run: rustup install && rustup component add rustfmt --toolchain nightly
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: swatinem/rust-cache@v2
|
uses: bf1942/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
|
||||||
@@ -50,15 +50,15 @@ jobs:
|
|||||||
working-directory: web
|
working-directory: web
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
- name: Setup bun
|
- name: Setup bun
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: bf1942/setup-bun@v2
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v4
|
uses: bf1942/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
|
||||||
|
|||||||
22
.github/workflows/release-build.yaml
vendored
22
.github/workflows/release-build.yaml
vendored
@@ -16,13 +16,13 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
- name: Download release artifact
|
- name: Download release artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: bf1942/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Publish GitHub release
|
- name: Publish GitHub release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: bf1942/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: bili-sync-rs*
|
files: bili-sync-rs*
|
||||||
tag_name: ${{ github.ref_name }}
|
tag_name: ${{ github.ref_name }}
|
||||||
@@ -35,30 +35,30 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: bf1942/checkout@v4
|
||||||
- name: Download release artifact
|
- name: Download release artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: bf1942/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Docker Meta
|
- name: Docker Meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: bf1942/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/bili-sync-rs
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/bili-sync-rs
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
type=raw,value=${{ github.ref_name }}
|
type=raw,value=${{ github.ref_name }}
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: bf1942/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: bf1942/setup-buildx-action@v3
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v3
|
uses: bf1942/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: bf1942/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
cache-from: type=gha, scope=${{ github.workflow }}
|
cache-from: type=gha, scope=${{ github.workflow }}
|
||||||
cache-to: type=gha, scope=${{ github.workflow }}
|
cache-to: type=gha, scope=${{ github.workflow }}
|
||||||
- name: Update DockerHub description
|
- name: Update DockerHub description
|
||||||
uses: peter-evans/dockerhub-description@v3
|
uses: bf1942/dockerhub-description@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user