ci: 更新 Docker 发布流程和镜像标签
- 在 Docker 发布流程中添加 update-manifest步骤 - 使用 yq 更新 values.yaml 中的镜像标签- 自动提交更新后的 manifest
This commit is contained in:
parent
0eb6f1d6e7
commit
14ad5aba68
9
.github/workflows/docker-publish.yml
vendored
9
.github/workflows/docker-publish.yml
vendored
@ -140,7 +140,10 @@ jobs:
|
||||
# against the sigstore community Fulcio instance.
|
||||
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
|
||||
|
||||
|
||||
update-manifest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: ["build"]
|
||||
steps:
|
||||
- name: Checkout manifest
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/checkout@v4
|
||||
@ -150,12 +153,12 @@ jobs:
|
||||
if: github.event_name == 'push'
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
cmd: yq eval '.tag = "${{ steps.meta.outputs.version }}"' -i values.yaml
|
||||
cmd: yq eval '.tag = "${{ needs.build.outputs.meta.outputs.tags }}"' -i values.yaml
|
||||
- name: Git Auto Commit
|
||||
if: github.event_name == 'push'
|
||||
uses: stefanzweifel/git-auto-commit-action@v5.0.1
|
||||
with:
|
||||
commit_message: "Update deployment image to ${{ steps.meta.outputs.version }}"
|
||||
commit_message: "Update deployment image tag to ${{ needs.build.outputs.meta.outputs.tags }}"
|
||||
branch: manifest
|
||||
commit_user_name: "github-actions[bot]"
|
||||
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
||||
|
Loading…
x
Reference in New Issue
Block a user