Skip to content

fix: remove + 'd' from mylink tokens #26

fix: remove + 'd' from mylink tokens

fix: remove + 'd' from mylink tokens #26

Workflow file for this run

name: Release
on:
push:
tags: [ 'v*' ]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: alerta
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
id: install-deps
run: |
python3 -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .
- name: Pre-commit hooks
id: hooks
run: |
pre-commit run -a --show-diff-on-failure
- name: Test with pytest
id: test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/alerta
run: |
pytest --cov=alerta tests/*.py
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()
release:
name: Publish
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Build
id: build
run: |
python3 -m pip install --upgrade build
python3 -m build
zip alerta-api.zip -r dist/*
tar cvfz alerta-api.tar.gz dist/*
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Zip File
id: upload-zip-file
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ./alerta-api.zip
- name: Upload Compressed TAR File
id: upload-tarball
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ./alerta-api.tar.gz
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}