From 5321c9b5e637b3cf043f32034e5d9f63a0739f35 Mon Sep 17 00:00:00 2001 From: MountainGod2 <88257202+MountainGod2@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:17:56 -0600 Subject: [PATCH] fix: add dependencies between build and cd workflows (#44) This commit adds the "needs" keyword to the build and cd workflows in the GitHub Actions configuration. This ensures that the cd workflow will only run after the build workflow has successfully completed. This dependency ensures that the Docker image is built and pushed to the GitHub Container Registry before the release and deployment steps are executed. Refactor the workflows to include the "needs" keyword for better workflow coordination and dependency management. --- .github/workflows/build.yml | 1 + .github/workflows/cd.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb218a48..d03d2281 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: jobs: build: name: Build and Push Docker Image to GitHub Container Registry + needs: cd runs-on: ubuntu-latest steps: - name: Checkout Repository diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0f9ad357..8c2aca75 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,6 +8,7 @@ on: jobs: cd: name: Handle Release and Deployment + needs: ci permissions: id-token: write contents: write