Skip to content

Commit

Permalink
chore(ci): add token to upload and trigger workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed Aug 10, 2023
1 parent cbdb6d5 commit 268807b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,8 @@ jobs:

-
name: Trigger workflow
env:
GH_TOKEN: ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}
run: |
gh workflow run release.yml -R jolicode/redirection.io -f environment=production -f package=module-nginx -f channel=beta -f version=$VERSION -f version_directory=$MAJOR_VERSION -f build_iteration=1 -f module_image=$DISTRIBUTION
-
name: Trigger Circle CI API
env:
CIRCLE_API_TOKEN: ${{ secrets.CIRCLE_API_TOKEN }}
DISTRIBUTION: ${{ matrix.distribution }}
run: >
curl --request POST
--url https://circleci.com/api/v2/project/github/jolicode/redirection.io/pipeline
--header "Circle-Token: $CIRCLE_API_TOKEN"
--header "Content-Type: application/json"
--data "
{
\"branch\":\"master\",
\"parameters\": {
\"run_main\":false,
\"run_php_sdk\": false,
\"run_lint\": false,
\"release_env\": \"production\",
\"release_channel\": \"beta\",
\"release_main_version_dir\": \"$MAJOR_VERSION\",
\"release_nginx_module_version\": \"$VERSION\",
\"release_distribution\": \"$DISTRIBUTION\"
}
}
"
2 changes: 2 additions & 0 deletions .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ jobs:

-
name: Trigger workflow
env:
GH_TOKEN: ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}
run: |
gh workflow run release.yml -R jolicode/redirection.io -f environment=production -f package=module-nginx -f channel=stable -f version=$VERSION -f version_directory=$MAJOR_VERSION -f build_iteration=1 -f module_image=$DISTRIBUTION

0 comments on commit 268807b

Please sign in to comment.