Skip to content

πŸ› Sandbox Deployment #136

πŸ› Sandbox Deployment

πŸ› Sandbox Deployment #136

name: πŸ› Sandbox Deployment
on:
workflow_dispatch:
inputs:
deployment-type:
description: 'Deploy to sandbox from which branch? (staging for release, main for hotfix)'
required: true
default: 'staging'
type: choice
options:
- 'main'
- 'staging'
jobs:
merge-staging-to-sandbox:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set Git config
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Set deployment type
run: |
echo "DEPLOYMENT_TYPE=${{ github.event.inputs.deployment-type }}" >> $GITHUB_ENV
shell: bash
- name: Merge staging into sandbox
run: |
git fetch --unshallow
git switch sandbox
git pull origin sandbox
git merge --no-ff origin/${{ env.DEPLOYMENT_TYPE }} -m "Merge ${{ env.DEPLOYMENT_TYPE }} into sandbox"
git push origin sandbox