Skip to content

Commit

Permalink
Add dynamic config creation
Browse files Browse the repository at this point in the history
  • Loading branch information
hubert.ostrowski committed Jul 18, 2024
1 parent 1d3ca3a commit 90c88f8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:

- name: Set Up Environment Variables
run: |
echo "AUTH_URL=${{ secrets.AUTH_URL }}" >> $GITHUB_ENV
echo "SYNC_URL=${{ secrets.SYNC_URL }}" >> $GITHUB_ENV
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}" >> $GITHUB_ENV
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> $GITHUB_ENV
echo "USERNAME=${{ secrets.USERNAME }}" >> $GITHUB_ENV
echo "PASSWORD=${{ secrets.PASSWORD }}" >> $GITHUB_ENV
echo "SECURITY_TOKEN=${{ secrets.SECURITY_TOKEN }}" >> $GITHUB_ENV
cat > wp-content/plugins/mozilla-salesforce-sync/_config.php << EOF
<?php
define('AUTH_URL', "${{ secrets.AUTH_URL }}");
define('SYNC_URL', "${{ secrets.SYNC_URL }}");
define('CLIENT_ID', "${{ secrets.CLIENT_ID }}");
define('CLIENT_SECRET', "${{ secrets.CLIENT_SECRET }}");
define('USERNAME', "${{ secrets.USERNAME }}");
define('PASSWORD', "${{ secrets.PASSWORD }}");
define('SECURITY_TOKEN', "${{ secrets.SECURITY_TOKEN }}");
EOF
cat wp-content/plugins/mozilla-salesforce-sync/_config.php
- name: GitHub Action Deploy to WP Engine
uses: wpengine/github-action-wpe-site-deploy@v3
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:

- name: Set Up Environment Variables
run: |
echo "AUTH_URL=${{ secrets.AUTH_URL }}" >> $GITHUB_ENV
echo "SYNC_URL=${{ secrets.SYNC_URL }}" >> $GITHUB_ENV
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}" >> $GITHUB_ENV
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> $GITHUB_ENV
echo "USERNAME=${{ secrets.USERNAME }}" >> $GITHUB_ENV
echo "PASSWORD=${{ secrets.PASSWORD }}" >> $GITHUB_ENV
echo "SECURITY_TOKEN=${{ secrets.SECURITY_TOKEN }}" >> $GITHUB_ENV
cat > wp-content/plugins/mozilla-salesforce-sync/_config.php << EOF
<?php
define('AUTH_URL', "${{ secrets.AUTH_URL }}");
define('SYNC_URL', "${{ secrets.SYNC_URL }}");
define('CLIENT_ID', "${{ secrets.CLIENT_ID }}");
define('CLIENT_SECRET', "${{ secrets.CLIENT_SECRET }}");
define('USERNAME', "${{ secrets.USERNAME }}");
define('PASSWORD', "${{ secrets.PASSWORD }}");
define('SECURITY_TOKEN', "${{ secrets.SECURITY_TOKEN }}");
EOF
cat wp-content/plugins/mozilla-salesforce-sync/_config.php
- name: GitHub Action Deploy to WP Engine
uses: wpengine/github-action-wpe-site-deploy@v3
Expand Down

0 comments on commit 90c88f8

Please sign in to comment.