Skip to content

Update all non-major dependencies #373

Update all non-major dependencies

Update all non-major dependencies #373

Workflow file for this run

# 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
label:
name: Apply labels
runs-on: ubuntu-latest
needs: deployment
steps:
- name: Staging deployment
uses: fedora-infra/label-when-in-branch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: staging
label: deployed:staging
- name: Production deployment
uses: fedora-infra/label-when-in-branch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: stable
label: deployed:prod
github-release:
name: Create a GitHub Release 📢
if: startsWith(github.ref, 'refs/tags/')
needs:
- ci
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Extract changelog section
id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: docs/changelog.md
pattern: '\[[[:word:].-]+\]\(.*\)\s-\s[0-9-]{10}'
no-print-matched-heading: true
- name: Extract and save the version
id: extract-version
run: |
echo -n VERSION= >> "$GITHUB_OUTPUT"
awk '/^version:/ { print $2 }' maubot.yaml >> "$GITHUB_OUTPUT"
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
name: Release ${{ steps.extract-version.outputs.VERSION }}
prerelease: ${{ contains(github.ref, 'rc') }}
body: ${{ steps.extract-changelog.outputs.markdown }}