Skip to content

Commit

Permalink
fix: validate tag var
Browse files Browse the repository at this point in the history
  • Loading branch information
elodie-bil3 committed Jan 16, 2024
1 parent 5f7573f commit 30745f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/integration-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ jobs:
repo: PrestaShopCorp/qanightlyresults-cd
inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "bulle": "${{ steps.get_bulle.outputs.BULLE }}", "project": "nightly", "repository": "PrestaShop/nightly-board", "tag": "${{ steps.get_tag.outputs.TAG }}"}'
token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }}
# ref: 'refs/heads/main'
ref: 'refs/heads/fix/ci-deployment'
ref: 'refs/heads/main'
7 changes: 6 additions & 1 deletion .github/workflows/preproduction-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ jobs:
id: branch
uses: tj-actions/[email protected]

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

- name: Trigger CI / CD
uses: aurelien-baudet/workflow-dispatch@v2
with:
workflow: preproduction-cd.yml
repo: PrestaShopCorp/qanightlyresults-cd
inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board", "commit": "$GITHUB_SHA"}'
inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board", "tag": "${{ steps.get_tag.outputs.TAG }}"}'
token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }}
ref: 'refs/heads/main'
7 changes: 6 additions & 1 deletion .github/workflows/production-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ jobs:
id: branch
uses: tj-actions/[email protected]

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

- name: Trigger CI / CD
uses: aurelien-baudet/workflow-dispatch@v2
with:
workflow: production-cd.yml
repo: PrestaShopCorp/qanightlyresults-cd
inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board", "commit": "$GITHUB_SHA"}'
inputs: '{ "branch": "${{ steps.branch.outputs.current_branch }}", "project": "nightly", "repository": "PrestaShop/nightly-board", "tag": "${{ steps.get_tag.outputs.TAG }}"}'
token: ${{ secrets.TERRAFORM_ACCESS_TOKEN }}
ref: 'refs/heads/main'

0 comments on commit 30745f5

Please sign in to comment.