refactor(github-actions): 使用yq-action替换直接wget和优化依赖图提交
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
gitea-sync.yml / trigger-gitea-sync (push) Waiting to run

- 在docker-publish.yml中使用mikefarah/yq-action直接替换繁琐的wget和chmod命令,用于更新manifest。
-通过精确的路径监听在maven.yml中优化依赖图提交动作,以响应pom.xml和src/更改,提高效率。
This commit is contained in:
suyiiyii 2024-08-25 19:37:02 +08:00
parent 8a9612bcb3
commit 95e1173849
2 changed files with 11 additions and 8 deletions

View File

@ -100,14 +100,11 @@ jobs:
uses: actions/checkout@v4
with:
ref: manifest
- name: Update manifest
if: github.event_name == 'push'
run: |
echo "Updating manifest"
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
chmod +x /usr/bin/yq
yq eval '.image.tag = "${{ steps.meta.outputs.tags }}"' -i values.yaml
uses: mikefarah/yq@master
with:
cmd: yq eval '.image.tag = "${{ steps.meta.outputs.tags }}"' -i values.yaml
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5.0.1
with:

View File

@ -11,8 +11,14 @@ name: Java CI with Maven
on:
push:
branches: [ "main" ]
paths:
- 'pom.xml'
- 'src/**'
pull_request:
branches: [ "main" ]
paths:
- 'pom.xml'
- 'src/**'
jobs:
build:
@ -34,5 +40,5 @@ jobs:
# 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@571e99aab1055c2e71a1e2309b9691de18d6b7d6
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6