Deploy Module workflows #71
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
name: Deploy Module workflows | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to deploy' | |
required: true | |
type: string | |
default: 'v3.800.11' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Module workflows | |
repoName: [vc-module-app-insights | |
,vc-module-assets | |
,vc-module-authorize-net | |
,vc-module-avatax | |
,vc-module-azureblob-assets | |
,vc-module-azure-ad | |
,vc-module-azure-search | |
,vc-module-back-in-stock | |
,vc-module-bulk-actions | |
,vc-module-cart | |
,vc-module-catalog | |
,vc-module-catalog-csv-import | |
,vc-module-catalog-personalization | |
,vc-module-catalog-publishing | |
,vc-module-content | |
,vc-module-contract | |
,vc-module-core | |
,vc-module-customer | |
,vc-module-customer-export-import | |
,vc-module-customer-review | |
,vc-module-dynamic-associations | |
,vc-module-elastic-app-search | |
,vc-module-elastic-search | |
,vc-module-elastic-search-8 | |
,vc-module-event-bus | |
,vc-module-experience-api | |
,vc-module-export | |
,vc-module-filesystem-assets | |
,vc-module-file-experience-api | |
,vc-module-gdpr | |
,vc-module-google-ecommerce-analytics | |
,vc-module-google-sso | |
,vc-module-hotjar | |
,vc-module-image-tools | |
,vc-module-inventory | |
,vc-module-lucene-search | |
,vc-module-marketing | |
,vc-module-marketing-experience-api | |
,vc-module-notification | |
,vc-module-order | |
,vc-module-payment | |
,vc-module-power-bi-reports | |
,vc-module-price-export-import | |
,vc-module-pricing | |
,vc-module-profile-experience-api | |
,vc-module-push-messages | |
,vc-module-quote | |
,vc-module-return | |
,vc-module-search | |
,vc-module-shipping | |
,vc-module-sitemaps | |
,vc-module-store | |
,vc-module-subscription | |
,vc-module-tax | |
,vc-module-webhooks | |
,vc-module-native-payment-methods | |
,vc-module-skyflow | |
,vc-module-shipstation | |
,vc-module-white-labeling | |
,vc-module-x-api | |
,vc-module-x-cart | |
,vc-module-x-catalog | |
,vc-module-x-cms | |
,vc-module-x-order | |
,vc-module-builder-io] | |
# Module samples workflows | |
# include: | |
# - deploymentFolder: modules-sample | |
# repoName: vc-module-order | |
# - deploymentFolder: modules-sample | |
# repoName: vc-module-customer | |
# - deploymentFolder: modules-sample | |
# repoName: vc-module-notification | |
env: | |
DEPLOY_REPO: ${{ github.repository_owner }}/${{ matrix.repoName }} | |
TEMPLATE_REPO_FOLDER: 'main' | |
TEMPLATES_LIST: 'release.yml publish-nugets.yml module-release-hotfix.yml module-ci.yml' | |
WORKING_DIR: ${{ github.workspace }} | |
steps: | |
- name: Checkout .github | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.version }} | |
path: ${{ env.TEMPLATE_REPO_FOLDER }} | |
- name: Checkout ${{ env.DEPLOY_REPO }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.DEPLOY_REPO }} | |
path: ${{ matrix.repoName }} | |
token: ${{ secrets.REPO_TOKEN }} | |
- name: Copy workflows | |
working-directory: ${{ env.WORKING_DIR }}/${{ env.TEMPLATE_REPO_FOLDER }}/workflow-templates | |
env: | |
DEST_FOLDER: '${{ env.WORKING_DIR }}/${{ matrix.repoName }}/.github/workflows/' | |
run: | | |
cp ${{ env.TEMPLATES_LIST }} ${{ env.DEST_FOLDER }} | |
- name: Setup Git Credentials | |
uses: VirtoCommerce/vc-github-actions/setup-git-credentials-github@master | |
with: | |
githubToken: ${{ secrets.REPO_TOKEN }} | |
- name: Commit changes to ${{ env.DEPLOY_REPO }} | |
working-directory: ${{ matrix.repoName }} | |
run: | | |
git add . | |
git commit -m "ci: Auto update Github Action workflows" | |
git push |