Skip to content

Commit

Permalink
chore: add action to update starter dependencies + update reference a…
Browse files Browse the repository at this point in the history
…ctions (medusajs#9385)

* chore: add action to update starter dependencies

* change trigger type

* trigger generating references on new RC release
  • Loading branch information
shahednasser authored Oct 3, 2024
1 parent 225d00c commit 97c193b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/generate-public-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
description: "Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or `ui` to generate UI reference."
required: false
default: "all"
release:
types: [published]
# Disable this action until v2 is out of RC
# release:
# types: [published]

jobs:
api-v2:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Generate Preview Reference [Automated]
name: Generate RC Reference [Automated]
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
workflow_call:
jobs:
preview-references:
rc-references:
uses: ./.github/workflows/generate-resources-reference.yml
preview-api:
rc-api:
name: Generate OAS
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -65,7 +64,7 @@ jobs:
www/utils/generated/oas-output
branch: "docs/generate-api-ref"
branch-suffix: "timestamp"
preview-dml:
rc-dml:
name: Generate DML JSON files
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-resources-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
references:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/update-on-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Update on RC Release

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- if: ${{ contains(github.event.release.tag_name, 'rc') }}
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.STARTER_ACCESS_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/medusajs/medusa-starter-default/actions/workflows/update-preview-deps.yml/dispatches \
-d '{"ref":"master"}'
generate-references:
uses: ./.github/workflows/generate-preview-references.yml

0 comments on commit 97c193b

Please sign in to comment.