forked from Simon-Initiative/oli-torus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Simon-Initiative:master' into master
- Loading branch information
Showing
64 changed files
with
926 additions
and
529 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Auto Deploy | ||
|
||
on: | ||
# Run this workflow after the Package workflow completes | ||
workflow_run: | ||
workflows: [Package] | ||
types: [completed] | ||
|
||
jobs: | ||
check-auto-deploy: | ||
name: Check AUTO_DEPLOY_ENABLED config | ||
if: github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ vars.AUTO_DEPLOY_TARGET }} | ||
url: https://${{ vars.AUTO_DEPLOY_TARGET }} | ||
outputs: | ||
enabled: ${{ steps.check_auto_deploy_enabled.outputs.enabled }} | ||
auto_deploy_ref: ${{ steps.get_auto_deploy_ref.outputs.auto_deploy_ref }} | ||
steps: | ||
- name: Check whether AUTO_DEPLOY_ENABLED is set to TRUE | ||
id: check_auto_deploy_enabled | ||
run: echo "enabled=$(if [ "${{ vars.AUTO_DEPLOY_ENABLED }}" == "TRUE" ] ; then echo true ; else echo false ; fi)" >> $GITHUB_OUTPUT | ||
- name: Get AUTO_DEPLOY_REF config | ||
id: get_auto_deploy_ref | ||
run: echo "auto_deploy_ref=$(if [ -n "${{ vars.AUTO_DEPLOY_REF }}" ] ; then echo ${{ vars.AUTO_DEPLOY_REF }} ; else echo refs/heads/master ; fi)" >> $GITHUB_OUTPUT | ||
|
||
auto-deploy: | ||
name: Auto Deploy | ||
if: github.event.workflow_run.conclusion == 'success' && github.ref == needs.check-auto-deploy.outputs.auto_deploy_ref && needs.check-auto-deploy.outputs.enabled == 'true' | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ vars.AUTO_DEPLOY_TARGET }} | ||
url: https://${{ vars.AUTO_DEPLOY_TARGET }} | ||
needs: [check-auto-deploy] | ||
|
||
steps: | ||
- run: echo "Auto deploy enabled for ref ${{ vars.AUTO_DEPLOY_REF }}. Deploying ${{ github.sha }} ${{ github.ref }} ${{ github.ref_name }} to ${{ vars.AUTO_DEPLOY_TARGET }}" | ||
|
||
# checkout the commit from the Package workflow that triggered the Auto Deploy workflow | ||
- name: 🛎️ Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.workflow_run.head_sha }} | ||
|
||
- name: 🧾 Build info | ||
id: info | ||
run: | | ||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
echo "app_version=$(cat mix.exs | grep version | sed -e 's/.*version: "\(.*\)",/\1/')" >> $GITHUB_OUTPUT | ||
echo "workspace=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT | ||
- name: 🚢💰 Deploy to test using SSH | ||
uses: fifsky/ssh-action@master | ||
with: | ||
command: | | ||
cd /torus | ||
sh deploy.sh -r ${{ github.ref }} ${{ steps.info.outputs.app_version }} ${{ steps.info.outputs.sha_short }} | ||
host: ${{ vars.AUTO_DEPLOY_TARGET }} | ||
user: simon-bot | ||
key: ${{ secrets.SIMON_BOT_PRIVATE_KEY}} | ||
port: 44067 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,6 +324,7 @@ module.exports = (env, options) => ({ | |
'[email protected]': 'MIT', | ||
'[email protected]': 'MIT', | ||
'[email protected]': 'MIT', | ||
'[email protected]': 'MIT', | ||
'[email protected]': 'MIT', | ||
}, | ||
unacceptableLicenseTest: (licenseIdentifier) => { | ||
|
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.