Skip to content

Commit

Permalink
Merge pull request #194 from bold-commerce/devops-547
Browse files Browse the repository at this point in the history
devops-547 Add workflow to deploy all psh stores
  • Loading branch information
brunoroux authored Dec 11, 2023
2 parents aa7a006 + e78fc81 commit f65e7ea
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/deploy-all-psh-stores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,31 @@ on:
- main

jobs:
update_stores:
uses: bold-commerce/github-actions/.github/workflows/deploy-all-platformsh-stores.yaml@main
secrets:
SSH_KEY: ${{ secrets.SSH_KEY }}
CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
update_stores:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Install platform CLI
run: |
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo -n '${{ secrets.SSH_KEY }}' > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
ssh-keyscan -H git.ca-1.platform.sh >> $HOME/.ssh/known_hosts
ssh-keyscan -H git.us.platform.sh >> $HOME/.ssh/known_hosts
- name: Update projects
env:
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
run: |
PROJECTS=`platform project:list --pipe`
for PROJECT in $PROJECTS;
do
echo "Updating project $PROJECT"
platform project:get --no-interaction $PROJECT $PROJECT
cd $PROJECT
platform redeploy --no-wait
done

0 comments on commit f65e7ea

Please sign in to comment.