chore: add action to update starter dependencies + update reference actions (#9385)

* chore: add action to update starter dependencies

* change trigger type

* trigger generating references on new RC release
This commit is contained in:
Shahed Nasser
2024-10-03 10:21:12 +03:00
committed by GitHub
parent 225d00cd09
commit 97c193be1b
4 changed files with 28 additions and 9 deletions
@@ -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." 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 required: false
default: "all" default: "all"
release: # Disable this action until v2 is out of RC
types: [published] # release:
# types: [published]
jobs: jobs:
api-v2: api-v2:
@@ -1,12 +1,11 @@
name: Generate Preview Reference [Automated] name: Generate RC Reference [Automated]
on: on:
workflow_dispatch: workflow_dispatch:
schedule: workflow_call:
- cron: "0 0 * * *"
jobs: jobs:
preview-references: rc-references:
uses: ./.github/workflows/generate-resources-reference.yml uses: ./.github/workflows/generate-resources-reference.yml
preview-api: rc-api:
name: Generate OAS name: Generate OAS
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -65,7 +64,7 @@ jobs:
www/utils/generated/oas-output www/utils/generated/oas-output
branch: "docs/generate-api-ref" branch: "docs/generate-api-ref"
branch-suffix: "timestamp" branch-suffix: "timestamp"
preview-dml: rc-dml:
name: Generate DML JSON files name: Generate DML JSON files
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -17,7 +17,7 @@ on:
jobs: jobs:
references: references:
runs-on: ubuntu-latest 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: steps:
- name: Cancel Previous Runs - name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0 uses: styfle/cancel-workflow-action@0.11.0
+19
View File
@@ -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