Skip to content

Commit

Permalink
Deploy with Github
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Oct 7, 2023
1 parent f174282 commit a726895
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,46 @@ jobs:
- name: execute tox
run: tox -- -v

deployment:
if: ${{ github.ref_name == "staging" || github.ref_name == "stable" }}
needs: ci
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}
concurrency:
group: ${{ github.ref_name }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"

- uses: actions/checkout@v4

- name: Create the configuration file
run: |
mkdir -p ~/.config/
echo '{"servers": {"${{ vars.MAUBOT_URL }}": "${{ secrets.MAUBOT_TOKEN }}"}, "default_server": "${{ vars.MAUBOT_URL }}"}' > ~/.config/maubot-cli.json
- name: Install maubot
run: |
sudo apt-get install jq
MAUBOT_VERSION=$(curl -s -H "Authorization:Bearer ${{ secrets.MAUBOT_TOKEN }}" ${{ vars.MAUBOT_URL }}/_matrix/maubot/v1/version | jq -r .version)
pip install maubot==${MAUBOT_VERSION}
- name: Deploy to the maubot server
run: |
mbc build -u

0 comments on commit a726895

Please sign in to comment.