feat(cicd):增加Workflow来更新部署镜像标签
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
gitea-sync.yml / trigger-gitea-sync (push) Waiting to run
Java CI with Maven / build (push) Waiting to run

This commit is contained in:
suyiiyii 2024-08-25 19:13:28 +08:00
parent 437b23022c
commit 6bffefee2e
2 changed files with 18 additions and 1 deletions

View File

@ -1,4 +1,4 @@
name: Docker
name: Docker Build and Publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
@ -94,3 +94,18 @@ jobs:
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
- name: Checkout manifest
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
ref: manifest
- name: Update manifest
if: github.event_name == 'push'
run: |
echo "Updating manifest"
yq eval '.image.tag = "${{ steps.meta.outputs.tags }}"' -i values.yaml
git add values.yaml
git commit -m "Update deployment image to ${{ steps.meta.outputs.tags }}"
git push

View File

@ -3,6 +3,8 @@ on:
push:
branches: [ "main", "manifest" ]
workflow_dispatch:
workflow_run:
workflows: ["Docker Build and Publish"]
jobs: