Files
2026-06-05 17:19:07 +00:00

80 lines
3.0 KiB
YAML

# Create a new issue inside a target repository in AllSpice
name: Notify Remote Repositories About a Release
on:
release:
types: [published, edited, deleted]
jobs:
create-new-issue-in-remote-repo:
runs-on: ubuntu-latest
steps:
# Check out repository code
- name: "[📚->🖥️] Check out repository code"
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.14'
# Installs python requirements for the py-allspice BIST.
- name: Install Python requirements
run: pip install -r .allspice/utils/requirements.txt
# Confirm the token and hub URL work through the py-allspice wrapper before
# using the raw API implementation below.
- name: Run py-allspice BIST
env:
ALLSPICE_AUTH_TOKEN: ${{ secrets.PAT }}
ALLSPICE_SERVER_URL: ${{ allspice.server_url }}
PYTHONUNBUFFERED: "1"
run: |
python -u .allspice/utils/py-allspice-BIST.py \
--allspice_hub_url "$ALLSPICE_SERVER_URL"
# Create issues via raw API (http.client)
- name: "[Method 1] Create release review issues via raw API"
env:
ALLSPICE_AUTH_TOKEN: ${{ secrets.PAT }}
ALLSPICE_SERVER_URL: ${{ allspice.server_url }}
PYTHONUNBUFFERED: "1"
RELEASE_ACTION: ${{ allspice.event.action }}
RELEASE_BODY: ${{ allspice.event.release.body }}
RELEASE_NAME: ${{ allspice.event.release.name }}
RELEASE_REPOSITORY: ${{ allspice.repository }}
RELEASE_TAG: ${{ allspice.event.release.tag_name }}
RELEASE_URL: ${{ allspice.event.release.html_url }}
run: |
python -u .allspice/utils/create-release-review-issues-api.py \
"$RELEASE_REPOSITORY" \
"$RELEASE_ACTION" \
"$RELEASE_TAG" \
"$RELEASE_NAME" \
"$RELEASE_URL" \
"$RELEASE_BODY" \
.allspice/notify-repos.txt \
--allspice_hub_url "$ALLSPICE_SERVER_URL" \
--issue_label "priority/5- critical"
# Create issues via py-allspice wrapper
- name: "[Method 2] Create release review issues via py-allspice"
env:
ALLSPICE_AUTH_TOKEN: ${{ secrets.PAT }}
ALLSPICE_SERVER_URL: ${{ allspice.server_url }}
PYTHONUNBUFFERED: "1"
RELEASE_ACTION: ${{ allspice.event.action }}
RELEASE_BODY: ${{ allspice.event.release.body }}
RELEASE_NAME: ${{ allspice.event.release.name }}
RELEASE_REPOSITORY: ${{ allspice.repository }}
RELEASE_TAG: ${{ allspice.event.release.tag_name }}
RELEASE_URL: ${{ allspice.event.release.html_url }}
run: |
python -u .allspice/utils/create-release-review-issues-py-allspice.py \
"$RELEASE_REPOSITORY" \
"$RELEASE_ACTION" \
"$RELEASE_TAG" \
"$RELEASE_NAME" \
"$RELEASE_URL" \
"$RELEASE_BODY" \
.allspice/notify-repos.txt \
--allspice_hub_url "$ALLSPICE_SERVER_URL"