mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-02 00:16:11 +08:00
refactor(github-actions): 使用yq-action替换直接wget和优化依赖图提交
- 在docker-publish.yml中使用mikefarah/yq-action直接替换繁琐的wget和chmod命令,用于更新manifest。 -通过精确的路径监听在maven.yml中优化依赖图提交动作,以响应pom.xml和src/更改,提高效率。
This commit is contained in:
parent
8a9612bcb3
commit
95e1173849
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
@ -100,14 +100,11 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: manifest
|
ref: manifest
|
||||||
|
|
||||||
- name: Update manifest
|
- name: Update manifest
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
run: |
|
uses: mikefarah/yq@master
|
||||||
echo "Updating manifest"
|
with:
|
||||||
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
|
cmd: yq eval '.image.tag = "${{ steps.meta.outputs.tags }}"' -i values.yaml
|
||||||
chmod +x /usr/bin/yq
|
|
||||||
yq eval '.image.tag = "${{ steps.meta.outputs.tags }}"' -i values.yaml
|
|
||||||
- name: Git Auto Commit
|
- name: Git Auto Commit
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5.0.1
|
uses: stefanzweifel/git-auto-commit-action@v5.0.1
|
||||||
with:
|
with:
|
||||||
|
10
.github/workflows/maven.yml
vendored
10
.github/workflows/maven.yml
vendored
@ -11,8 +11,14 @@ name: Java CI with Maven
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
paths:
|
||||||
|
- 'pom.xml'
|
||||||
|
- 'src/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
paths:
|
||||||
|
- 'pom.xml'
|
||||||
|
- 'src/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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
|
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
|
||||||
# - name: Update dependency graph
|
- name: Update dependency graph
|
||||||
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user