This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from PrestaShop/feat/workflows
Feat/workflows
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: PrestonBot Integration CICD | ||
|
||
concurrency: | ||
group: prestonbot-${{ github.ref }} | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize, labeled] | ||
|
||
jobs: | ||
|
||
prestonbot-integration: | ||
name: Trigger Integration CICD | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: contains(github.event.pull_request.labels.*.name, 'integration deployment') | ||
|
||
steps: | ||
|
||
- name: Get tag | ||
shell: bash | ||
id: get_tag | ||
run: echo TAG=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT | ||
|
||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.PRESTONBOT_CD_PAT }} | ||
repository: ${{ secrets.PRESTONBOT_CD_REPOSITORY }} | ||
event-type: integration_deployment | ||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get_tag.outputs.TAG }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: PrestonBot Production CICD | ||
|
||
concurrency: | ||
group: prestonbot-${{ github.ref }} | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
|
||
prestonbot-production: | ||
name: Trigger Production CICD | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
|
||
- name: Get tag | ||
shell: bash | ||
id: get_tag | ||
run: echo TAG=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT | ||
|
||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.PRESTONBOT_CD_PAT }} | ||
repository: ${{ secrets.PRESTONBOT_CD_REPOSITORY }} | ||
event-type: production_deployment | ||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get_tag.outputs.TAG }}"}' |