Skip to content

Commit

Permalink
fix: add auto deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nmrgt committed Jan 29, 2024
1 parent a9f8b46 commit ac54005
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/deploy-cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,25 @@ jobs:
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

# TODO
# deploy:
# name: Deploy
# needs: [tag, build]
# runs-on: ubuntu-latest
# steps:
# - name: Trigger Workflow
# uses: actions/github-script@v6
# env:
# TARGET_VERSION: ${{ needs.tag.outputs.value }}
# with:
# github-token: ${{ secrets.GA_PDC_TOKEN }}
# script: |
# github.rest.actions.createWorkflowDispatch({
# owner: context.repo.owner,
# repo: 'preuve-covoiturage-infra',
# workflow_id: 'deploy.yml',
# ref: 'main',
# inputs: {
# version: process.env.TARGET_VERSION,
# image: 'cms'
# },
# })
deploy:
name: Deploy
needs: [tag, build]
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow
uses: actions/github-script@v6
env:
TARGET_VERSION: ${{ needs.tag.outputs.value }}
with:
github-token: ${{ secrets.GA_PDC_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'preuve-covoiturage-infra',
workflow_id: 'deploy.yml',
ref: 'main',
inputs: {
version: process.env.TARGET_VERSION,
image: 'strapi'
},
})

0 comments on commit ac54005

Please sign in to comment.