Skip to content

Container continues to run silently when cos-alerter fails (#70) #11

Container continues to run silently when cos-alerter fails (#70)

Container continues to run silently when cos-alerter fails (#70) #11

Workflow file for this run

name: Push to Main
on:
workflow_dispatch: {}
push:
branches:
- main
jobs:
version-check:
runs-on: ubuntu-latest
outputs:
new_version: ${{ steps.check-version.outputs.new_version }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Version
id: check-version
run: |
version=$(grep -P -o 'version = "\d+\.\d+\.\d+"' pyproject.toml | grep -P -o '\d+\.\d+\.\d+')
tags=$(git tag -l '*.*.*')
match=$(echo ${tags} | grep -w -c ${version} | cat)
if [ "${match}" == "0" ]; then
echo "new_version=${version}" >> "${GITHUB_OUTPUT}"
else
echo "new_version=false" >> "${GITHUB_OUTPUT}"
fi
python-package:
runs-on: ubuntu-latest
needs: version-check
if: ${{ needs.version-check.outputs.new_version != 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Install Build Tools
run: pip install --upgrade build twine
- name: Build
run: python3 -m build
- name: Upload
run: |
python3 -m twine upload \
--verbose --non-interactive \
--username __token__ --password ${{ secrets.PYPI_TOKEN }} \
dist/*
- name: Tag
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
custom_tag: "${{ needs.version-check.outputs.new_version }}"
tag_prefix: ""
default_bump: false
rock:
uses: canonical/observability/.github/workflows/build-rock.yaml@main

Check failure on line 58 in .github/workflows/push-main.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/push-main.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/push-main.yaml" -> "canonical/observability/.github/workflows/build-rock.yaml@main" : failed to fetch workflow: workflow was not found.
needs: python-package
secrets: inherit
with:
rock-name: cos-alerter
tag-minor: true