Skip to content

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

Move deploy steps before changelog PR (#2971)

Dhruv Bhanushali24df85faa63a
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 95b378b2a..28e51086e 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -96,6 +96,50 @@ jobs:
docker buildx imagetools create ghcr.io/wordpress/openverse-api_nginx:${{ inputs.image-sha }} --tag ghcr.io/wordpress/openverse-api_nginx:${{ steps.tag.outputs.image-tag }}
fi
+ - name: Deploy production application
+ if: inputs.app == 'frontend' || inputs.app == 'api'
+ uses: felixp8/[email protected]
+ with:
+ owner: WordPress
+ repo: openverse-infrastructure
+ token: ${{ secrets.ACCESS_TOKEN }}
+ event_type: deploy_production_${{ inputs.app == 'frontend' && 'nuxt' || inputs.app }}
+ client_payload: |
+ {
+ "actor": "${{ github.actor }}",
+ "tag": "${{ steps.tag.outputs.image-tag }}"
+ }
+ wait_time: 60 # check every minute
+ max_time: 1800 # allow up to 30 minutes for a deployment
+ # max_time can't easily be configured per application
+ # without duplicating information between our infrastructure
+ # and this workflow. The upstream workflows already have
+ # timeouts appropriately configured and will all fail before 30
+ # minutes is reached. On the other hand, we do want to wait
+ # so that there is a record of the successful deployment.
+
+ - name: Deploy production thumbnails
+ if: inputs.app == 'api'
+ uses: felixp8/[email protected]
+ with:
+ owner: WordPress
+ repo: openverse-infrastructure
+ token: ${{ secrets.ACCESS_TOKEN }}
+ event_type: deploy_production_api_thumbnails
+ client_payload: |
+ {
+ "actor": "${{ github.actor }}",
+ "tag": "${{ steps.tag.outputs.image-tag }}"
+ }
+ wait_time: 60 # check every minute
+ max_time: 1800 # allow up to 30 minutes for a deployment
+ # max_time can't easily be configured per application
+ # without duplicating information between our infrastructure
+ # and this workflow. The upstream workflows already have
+ # timeouts appropriately configured and will all fail before 30
+ # minutes is reached. On the other hand, we do want to wait
+ # so that there is a record of the successful deployment.
+
- name: Create and publish release
uses: release-drafter/release-drafter@v5
id: release-drafter
@@ -141,6 +185,7 @@ jobs:
- name: Open changelog PR
uses: peter-evans/create-pull-request@v5
+ if: ${{ !cancelled() }}
with:
# Access token necessary for PRs to run with CI
token: ${{ secrets.ACCESS_TOKEN }}
@@ -157,47 +202,3 @@ jobs:
skip-changelog
body: |
This changelog PR was automatically generated for @${{ github.actor }} as a result of the ${{ github.workflow }} workflow.
-
- - name: Deploy production application
- if: inputs.app == 'frontend' || inputs.app == 'api'
- uses: felixp8/[email protected]
- with:
- owner: WordPress
- repo: openverse-infrastructure
- token: ${{ secrets.ACCESS_TOKEN }}
- event_type: deploy_production_${{ inputs.app == 'frontend' && 'nuxt' || inputs.app }}
- client_payload: |
- {
- "actor": "${{ github.actor }}",
- "tag": "${{ steps.tag.outputs.image-tag }}"
- }
- wait_time: 60 # check every minute
- max_time: 1800 # allow up to 30 minutes for a deployment
- # max_time can't easily be configured per application
- # without duplicating information between our infrastructure
- # and this workflow. The upstream workflows already have
- # timeouts appropriately configured and will all fail before 30
- # minutes is reached. On the other hand, we do want to wait
- # so that there is a record of the successful deployment.
-
- - name: Deploy production thumbnails
- if: inputs.app == 'api'
- uses: felixp8/[email protected]
- with:
- owner: WordPress
- repo: openverse-infrastructure
- token: ${{ secrets.ACCESS_TOKEN }}
- event_type: deploy_production_api_thumbnails
- client_payload: |
- {
- "actor": "${{ github.actor }}",
- "tag": "${{ steps.tag.outputs.image-tag }}"
- }
- wait_time: 60 # check every minute
- max_time: 1800 # allow up to 30 minutes for a deployment
- # max_time can't easily be configured per application
- # without duplicating information between our infrastructure
- # and this workflow. The upstream workflows already have
- # timeouts appropriately configured and will all fail before 30
- # minutes is reached. On the other hand, we do want to wait
- # so that there is a record of the successful deployment.