From 6bffefee2e3f559b6693e54ae4a4483a9b7e6517 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Sun, 25 Aug 2024 19:13:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(cicd):=E5=A2=9E=E5=8A=A0Workflow=E6=9D=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E7=BD=B2=E9=95=9C=E5=83=8F=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-publish.yml | 17 ++++++++++++++++- .github/workflows/gitea-sync.yml | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 98bd621..19f725f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -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 diff --git a/.github/workflows/gitea-sync.yml b/.github/workflows/gitea-sync.yml index 187eea0..1c162a9 100644 --- a/.github/workflows/gitea-sync.yml +++ b/.github/workflows/gitea-sync.yml @@ -3,6 +3,8 @@ on: push: branches: [ "main", "manifest" ] workflow_dispatch: + workflow_run: + workflows: ["Docker Build and Publish"] jobs: