From 7f2eec617c6c27bbeadb4d7e5ba3dbf027a2616f Mon Sep 17 00:00:00 2001 From: Christian Oertlin Date: Mon, 11 Mar 2024 14:09:31 +0100 Subject: [PATCH] add workflows --- .github/workflows/deploy_prod.yml | 25 +++++++++++++++++++++++++ .github/workflows/deploy_stage.yml | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/deploy_prod.yml create mode 100644 .github/workflows/deploy_stage.yml 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"}'