优化解析器链接识别 #287
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Java CI with Maven | |
# The API requires write permission on the repository to submit dependencies | |
permissions: | |
contents: write | |
packages: write | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- 'bin/**' | |
- '.github/**' | |
- '.mvn/**' | |
- '.run/**' | |
- '.vscode/**' | |
- '*.txt' | |
- '*.md' | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
cache-dependency-path: 'web-front/yarn.lock' | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build Frontend | |
run: cd web-front && yarn install && yarn run build | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | |
- name: Update dependency graph | |
uses: advanced-security/maven-dependency-submission-action@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
ignore-maven-wrapper: true | |
# - uses: release-drafter/release-drafter@v5 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: web-service/target/netdisk-fast-download-bin.zip | |
- name: Login to GitHub Container Registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
if: github.event_name != 'pull_request' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ github.sha }} | |
ghcr.io/${{ github.repository }}:main |