Skip to content

Commit

Permalink
Merge branch 'feat/workflow-dispatch' of github.com:PrestaShop/autoup…
Browse files Browse the repository at this point in the history
…grade into feat/workflow-dispatch
  • Loading branch information
JMorinPS committed Nov 19, 2024
2 parents 07e53c6 + d1023df commit a87db7d
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/storybook-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,28 @@ on:
push:
branches:
- dev
- master
tags:
- "*"

- feat/workflow-dispatch
release:
types: [released]

jobs:
storybook-repository-dispatch:
name: Trigger Repository Dispatch
runs-on: ubuntu-latest
timeout-minutes: 10

steps:

steps:
- name: Get tag
shell: bash
id: get_tag
run: echo TAG=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch


- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.AUTOUPGRADE_CD_PAT }}
repository: ${{ secrets.AUTOUPGRADE_CD_REPOSITORY }}
event-type: branch-${{ steps.extract_branch.outputs.branch }}
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get_tag.outputs.TAG }}"}'
event-type: storybook
#client-payload: '{"environment": "${{ github.event.action == ''released'' && ''production'' || ''integration'' }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get_tag.outputs.TAG }}"}'
client-payload: '{"environment": "integration", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get_tag.outputs.TAG }}"}'

0 comments on commit a87db7d

Please sign in to comment.