-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (32 loc) · 1.06 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# SPDX-FileCopyrightText: Contributors to the Fedora Project
#
# SPDX-License-Identifier: MIT
name: CI & Deployment
on: [push, pull_request, workflow_dispatch]
jobs:
ci:
name: CI
strategy:
fail-fast: false
runs-on: ubuntu-latest
container: fedorapython/fedora-python-tox:latest
steps:
- uses: actions/checkout@v4
- name: Mark the directory as safe for git
run: git config --global --add safe.directory $PWD
- name: Install RPM dependencies
run: |
dnf install -y krb5-devel libpq-devel gettext python-tox
- name: execute tox
run: tox -- -v
deployment:
name: Deployment
if: github.ref_name == 'staging' || github.ref_name == 'stable'
needs: ci
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}
steps:
- name: Send generic webhook
run: |
curl -f -X POST -k https://${{vars.OPENSHIFT_API_HOSTNAME}}:6443/apis/build.openshift.io/v1/namespaces/maubot/buildconfigs/maubot-build/webhooks/${{secrets.MAUBOT_WEBHOOK_SECRET}}/generic