diff --git a/.github/workflows/deploy_prod.yml b/.github/workflows/deploy_prod.yml new file mode 100644 index 0000000..76547d6 --- /dev/null +++ b/.github/workflows/deploy_prod.yml @@ -0,0 +1,25 @@ +--- +name: Deploy release to production environment + +on: + workflow_dispatch: + inputs: + tag_name: + description: "Release tag" + +jobs: + create_deployment: + runs-on: ubuntu-latest + steps: + - run: | + curl \ + --fail \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${{ secrets.BUMPVERSION_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }}/deployments \ + -d '{ + "ref": "${{ github.event.inputs.tag_name }}", + "environment": "production", + "auto_merge": false, + "description": "deploy_janus_prod"}' diff --git a/.github/workflows/deploy_stage.yml b/.github/workflows/deploy_stage.yml new file mode 100644 index 0000000..32c00ab --- /dev/null +++ b/.github/workflows/deploy_stage.yml @@ -0,0 +1,25 @@ +--- +name: Deploy branch to staging environment + +on: + workflow_dispatch: + inputs: + branch_name: + description: "Branch name" + +jobs: + create_deployment: + runs-on: ubuntu-latest + steps: + - run: | + curl \ + --fail \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${{ secrets.BUMPVERSION_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }}/deployments \ + -d '{ + "ref": "${{ github.event.inputs.branch_name }}", + "environment": "stage", + "auto_merge": false, + "description": "deploy_janus_stage"}'