ci: add sandbox deploy workflow (wip)

This commit is contained in:
Nicolas Giard 2022-10-25 14:46:16 -04:00 committed by GitHub
parent d34e88dfd9
commit ba3391b8f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,10 @@ on:
description: 'Create Production Release'
required: true
type: boolean
sandbox:
description: 'Deploy to Sandbox'
required: true
type: boolean
skiptests:
description: 'Skip Tests'
required: true
@ -388,7 +392,6 @@ jobs:
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
if: ${{ env.SHOULD_DEPLOY == 'false' || github.event.inputs.dryrun == 'true' }}
with:
name: release-${{ env.PKG_VERSION }}
path: /home/runner/work/release/release.tar.gz
@ -403,3 +406,36 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_GH_BOT }}
# -----------------------------------------------------------------
# SANDBOX
# -----------------------------------------------------------------
sandbox:
name: Deploy to Sandbox
if: ${{ github.event.inputs.sandbox == 'true' }}
needs: [release]
runs-on: dev-server
env:
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Download a Release Artifact
uses: actions/download-artifact@v3.0.0
with:
name: release-${{ env.PKG_VERSION }}
- name: Extract Release Artifact
env:
DEBIAN_FRONTEND: noninteractive
run: |
echo "Docker containers:"
docker ps -a
echo "List files:"
ls
echo "Extract:"
tar -xzf release-${{ env.PKG_VERSION }}.tar.gz