Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Dispatch workflows instead of regular reuse to show deployment runs (#1034)

sarayourfriend1a58c9caa9f7
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 5c1408212..997a70703 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -733,8 +733,12 @@ jobs:
# Deployment #
##############
+ # See https://github.com/WordPress/openverse/issues/1033 for why
+ # we don't use the standard reusable workflow approach for these.
+
deploy-frontend:
name: Deploy staging frontend
+ runs-on: ubuntu-latest
if: |
!failure() && !cancelled() &&
github.event_name == 'push' &&
@@ -746,13 +750,16 @@ jobs:
- playwright
- get-image-tag
- publish-images
- uses: ./.github/workflows/deploy-staging-nuxt.yml
- with:
- tag: ${{ needs.get-image-tag.outputs.image_tag }}
- secrets: inherit
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Dispatch workflow
+ run: "gh workflow run 'Deployment: staging-nuxt' -f tag=${{ needs.get-image-tag.outputs.image_tag }}"
deploy-api:
name: Deploy staging API
+ runs-on: ubuntu-latest
if: |
!failure() && !cancelled() &&
github.event_name == 'push' &&
@@ -762,7 +769,9 @@ jobs:
- get-changes
- get-image-tag
- publish-images
- uses: ./.github/workflows/deploy-staging-api.yml
- with:
- tag: ${{ needs.get-image-tag.outputs.image_tag }}
- secrets: inherit
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Dispatch workflow
+ run: "gh workflow run 'Deployment: staging-api' -f tag=${{ needs.get-image-tag.outputs.image_tag }}"
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index b46ba9c21..f4d4bc0d1 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -154,12 +154,8 @@ jobs:
- name: Deploy production api
if: inputs.app == 'api'
- uses: ./.github/workflows/deploy-production-api.yml
- with:
- tag: ${{ steps.tag.outputs.image-tag }}
+ run: "gh workflow run 'Deployment: production-api' -f tag=${{ steps.tag.outputs.image-tag }}"
- name: Deploy production frontend
if: inputs.app == 'frontend'
- uses: ./.github/workflows/deploy-production-nuxt.yml
- with:
- tag: ${{ steps.tag.outputs.image-tag }}
+ run: "gh workflow run 'Deployment: production-nuxt' -f tag=${{ steps.tag.outputs.image-tag }}"