5 Commits

Author SHA1 Message Date
2b06839924 chore(deps): lock file maintenance
Some checks failed
Enforce Conventional Commit PR Title / Validate PR Title (pull_request_target) Successful in 17s
CI / ci (pull_request) Failing after 1m0s
2025-05-12 00:49:15 +00:00
b8918b3d03 Update .gitea/workflows/release.yml
Some checks failed
Release / Tag release (push) Successful in 28s
Release / Create Release (push) Successful in 13s
Release / Publish Docker Images (push) Failing after 2m7s
Security / sonarqube (push) Failing after 2m8s
Security / snyk (push) Successful in 1m32s
2025-05-10 22:27:22 +02:00
4369470727 chore(ci): remove get_release_id task (#484)
All checks were successful
Security / snyk (push) Successful in 2m54s
Security / sonarqube (push) Successful in 3m22s
Okay, I will analyze the provided Git diff and explain the proposed changes.

**Overall Summary**

The diff shows a commented-out job in the `.gitea/workflows/release.yml` file.  The job `get_release_id` and its associated steps are being commented out. Also, the `needs` attribute for `create_docker` job has been changed.

**Detailed Explanation**

1.  **Commenting out the `get_release_id` job:**

    The entire `get_release_id` job block is being commented out. This includes the `name`, `runs-on`, `needs`, `outputs`, and `steps` sections.

    ```diff
    --- a/.gitea/workflows/release.yml
    +++ b/.gitea/workflows/release.yml
    @@ -23,26 +23,26 @@ jobs:
        secrets:
          ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}

    -  get_release_id:
    -    name: Get Release ID
    -    runs-on: ubuntu-latest
    -    needs: [tag, create_release]
    -    outputs:
    -      releaseid: ${{ steps.getid.outputs.releaseid }}
    -    steps:
    -      - name: Get Release ID
    -        id: getid
    -        run: |
    -          rid=$(curl -s -X 'GET' \
    -          -H 'accept: application/json' \
    -          '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
    -          echo "releaseid=$rid" >> "$GITEA_OUTPUT"
    -          echo "$rid"
    +  # get_release_id:
    +  #   name: Get Release ID
    +  #   runs-on: ubuntu-latest
    +  #   needs: create_release
    +  #   outputs:
    +  #     releaseid: ${{ steps.getid.outputs.releaseid }}
    +  #   steps:
    +  #     - name: Get Release ID
    +  #     - id: getid
    +  #     - run: |
    +  #       rid=$(curl -s -X 'GET' \
    +  #       -H 'accept: application/json' \
    +  #       '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
    +  #       echo "releaseid=$rid" >> "$GITEA_OUTPUT"
    +  #       echo "$rid"
    ```

    The original `get_release_id` job was responsible for fetching the ID of the latest release using a `curl` command against the Gitea API. The output `releaseid` was likely intended to be used by subsequent jobs.  Commenting this out means this ID will no longer be available.

2.  **Modifying the `needs` attribute for the `create_docker` job:**

    The `needs` attribute of the `create_docker` job has been modified.

    ```diff
    --- a/.gitea/workflows/release.yml
    +++ b/.gitea/workflows/release.yml
    @@ -50,7 +50,7 @@
     create_docker:
       name: Publish Docker Images
       runs-on: ubuntu-latest
    -  needs: tag
    +  needs: create_release
       steps:
         - name: Update Docker configuration
           continue-on-error: true
    ```

    The original `needs: tag` has been changed to `needs: create_release`. This means that the `create_docker` job will now only run after the `create_release` job has completed successfully, instead of after the `tag` job.

**Impact and Potential Reasons**

*   **Removal of Release ID:** By commenting out `get_release_id`, any downstream jobs relying on the `releaseid` output will likely break.  The reason for removing this is not apparent from the diff, but it could be due to:

    *   The ID is no longer needed.
    *   The method for obtaining the ID has changed and is implemented elsewhere.
    *   The job was causing issues and is being temporarily disabled.
    *   The job was not functioning as intended.

*   **Changing Dependency for Docker Image Creation:**  Changing the dependency of `create_docker` to `create_release` suggests a change in the intended workflow.  Previously, the Docker image creation was triggered by the creation of a tag. Now, it's triggered specifically by the creation of a release. This might be done to ensure that Docker images are only built and published when a formal release is made, rather than on every tag.

It's important to examine the broader context of the pull request and any associated issues to understand the rationale behind these changes more fully.

Reviewed-on: #484
2025-05-10 22:15:19 +02:00
52bb626eea fix(deps): update dependency astroid to <=3.3.10 (#481)
All checks were successful
Security / snyk (push) Successful in 2m21s
Security / sonarqube (push) Successful in 3m0s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astroid](https://github.com/pylint-dev/astroid) | project.dependencies | patch | `<=3.3.9` -> `<=3.3.10` |

---

### Release Notes

<details>
<summary>pylint-dev/astroid (astroid)</summary>

### [`v3.3.10`](https://github.com/pylint-dev/astroid/blob/HEAD/ChangeLog#Whats-New-in-astroid-3310)

[Compare Source](https://github.com/pylint-dev/astroid/compare/v3.3.9...v3.3.10)

\=============================
Release date: 2025-05-10

-   Avoid importing submodules sharing names with standard library modules.

    Closes [#&#8203;2684](https://github.com/pylint-dev/astroid/issues/2684)

-   Fix bug where `pylint code.custom_extension` would analyze `code.py` or `code.pyi` instead if they existed.

    Closes [pylint-dev/pylint#3631](https://github.com/pylint-dev/pylint/issues/3631)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC44LjIiLCJ1cGRhdGVkSW5WZXIiOiI0MC44LjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInR5cGUvZGVwZW5kZW5jaWVzIl19-->

Reviewed-on: https://git.tainton.uk/repos/webexmemebot/pulls/481
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-05-10 21:40:39 +02:00
ed35c1b8e6 fix(ci): fix release workflow (#482)
Some checks failed
Security / snyk (push) Has been cancelled
Security / sonarqube (push) Has been cancelled
Reviewed-on: #482
2025-05-10 21:39:56 +02:00
3 changed files with 58 additions and 115 deletions

View File

@ -2,104 +2,47 @@ name: Release
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: "0 9 * * 0" - cron: '0 9 * * 0'
issue_comment:
types: [created]
jobs: jobs:
manual_trigger:
name: Manual Trigger Cleanup
runs-on: ubuntu-latest
if: ${{ gitea.event_name == 'issue_comment' }}
steps:
- name: Log event metadata
run: |
echo "Issue: ${{ gitea.event.issue.number }}"
echo "Comment: ${{ gitea.event.comment.body }}"
echo "User: ${{ gitea.event.comment.user.login }}"
- name: Stop workflow if required conditions are not met
if: ${{ !contains(gitea.event.issue.number, '436') || !contains(gitea.event.comment.body, '/trigger-release') || !contains(gitea.event.comment.user.login, 'luke') }}
run: exit 1
- name: Delete issue comment
run: |
curl -X DELETE \
-H "Authorization: token ${{ gitea.token }}" \
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/comments/${{ gitea.event.comment.id }}"
# test: # test:
# name: Unit Test # name: Test
# uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@main # uses: https://git.tainton.uk/${{ gitea.repository }}/.gitea/workflows/ci.yml@main
# continue-on-error: true
tag:
name: Tag release
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/release-with-tag.yaml@main
create_release: create_release:
name: Create Release name: Create Release
needs: tag
uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release-preexisting-tag.yaml@main
with:
tag: ${{ needs.tag.outputs.tag_name }}
body: ${{ needs.tag.outputs.changelog }}
secrets:
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
# get_release_id:
# name: Get Release ID
# runs-on: ubuntu-latest
# needs: create_release
# outputs:
# releaseid: ${{ steps.getid.outputs.releaseid }}
# steps:
# - name: Get Release ID
# id: getid
# run: |
# rid=$(curl -s -X 'GET' \
# -H 'accept: application/json' \
# '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
# echo "releaseid=$rid" >> "$GITEA_OUTPUT"
# echo "$rid"
create_docker:
name: Publish Docker Images
runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: test needs: [tag, create_release]
outputs:
release_name: ${{ steps.get_next_version.outputs.tag }}
steps:
- name: Check out repository
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Changes since last tag
id: changes
run: |
rm -f .changes
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes
cat .changes
- name: Check for changes
run: |
if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then
echo "changes=false"
echo "changes=false" >> "$GITEA_OUTPUT"
else
echo "changes=true"
echo "changes=true" >> "$GITEA_OUTPUT"
fi
- name: Cancel if no changes
if: steps.changes.outputs.changes == 'false'
run: exit 1
- name: Set server URL
id: set_srvurl
run: |
SRVURL=$(echo "${{ gitea.server_url }}" | sed 's/https:\/\/\(.*\)/\1/')
echo "srvurl=$SRVURL" >> "$GITEA_OUTPUT"
- name: Get next version
uses: TriPSs/conventional-changelog-action@v6
id: get_next_version
with:
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
github-token: ${{ gitea.token }}
preset: "conventionalcommits"
# preset: "angular" # This is the default
skip-commit: true
release-count: 1
output-file: false
create-summary: true
skip-on-empty: true
skip-version-file: true
skip-tag: true
- name: Create release
run: |
curl -s -X POST \
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases"
build_docker:
name: Build Docker Images
needs: create_release
steps: steps:
- name: Update Docker configuration - name: Update Docker configuration
continue-on-error: true continue-on-error: true
@ -111,11 +54,17 @@ jobs:
echo "DOCKER_OPTS=\"--insecure-registry ${{ vars.PACKAGES_REGISTRY_URL }}\"" >> /etc/default/docker echo "DOCKER_OPTS=\"--insecure-registry ${{ vars.PACKAGES_REGISTRY_URL }}\"" >> /etc/default/docker
echo "{\"insecure-registries\": [\"${{ vars.PACKAGES_REGISTRY_URL }}\"]}" > /etc/docker/daemon.json echo "{\"insecure-registries\": [\"${{ vars.PACKAGES_REGISTRY_URL }}\"]}" > /etc/docker/daemon.json
- name: Get repo name
id: split
run: echo "repo=${REPO##*/}" >> "$GITEA_OUTPUT"
env:
REPO: ${{ gitea.repository }}
- name: Check out repository - name: Check out repository
uses: actions/checkout@v4 uses: actions/checkout@v4.2.2
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ needs.create_release.outputs.release_name }} ref: ${{ needs.tag.outputs.tag_name }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -133,21 +82,15 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ vars.GHCR_USERNAME }} username: ${{ vars.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }} password: ${{ secrets.GHCR_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
tags: type=semver,pattern=v{{version}},value=${{ needs.tag.outputs.tag_name }}
images: | images: |
ghcr.io/${{ vars.GHCR_USERNAME }}/webexmemebot ghcr.io/${{ vars.GHCR_USERNAME }}/${{ steps.split.outputs.repo }}
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }} ${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}
tags: type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }}
- name: Print metadata - name: Print metadata
run: | run: |

View File

@ -10,7 +10,7 @@ requires-python = ">=3.11.2"
dependencies = [ dependencies = [
"webex-bot<1.0.0,>=0.5.2", "webex-bot<1.0.0,>=0.5.2",
"pillow<12.0.0,>=11.0.0", "pillow<12.0.0,>=11.0.0",
"astroid<=3.3.9", "astroid<=3.3.10",
] ]
[tool.uv] [tool.uv]

26
uv.lock generated
View File

@ -8,11 +8,11 @@ resolution-markers = [
[[package]] [[package]]
name = "astroid" name = "astroid"
version = "3.3.9" version = "3.3.10"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/39/33/536530122a22a7504b159bccaf30a1f76aa19d23028bd8b5009eb9b2efea/astroid-3.3.9.tar.gz", hash = "sha256:622cc8e3048684aa42c820d9d218978021c3c3d174fb03a9f0d615921744f550", size = 398731, upload-time = "2025-03-09T11:54:36.388Z" } sdist = { url = "https://files.pythonhosted.org/packages/00/c2/9b2de9ed027f9fe5734a6c0c0a601289d796b3caaf1e372e23fa88a73047/astroid-3.3.10.tar.gz", hash = "sha256:c332157953060c6deb9caa57303ae0d20b0fbdb2e59b4a4f2a6ba49d0a7961ce", size = 398941, upload-time = "2025-05-10T13:33:10.405Z" }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/de/80/c749efbd8eef5ea77c7d6f1956e8fbfb51963b7f93ef79647afd4d9886e3/astroid-3.3.9-py3-none-any.whl", hash = "sha256:d05bfd0acba96a7bd43e222828b7d9bc1e138aaeb0649707908d3702a9831248", size = 275339, upload-time = "2025-03-09T11:54:34.489Z" }, { url = "https://files.pythonhosted.org/packages/15/58/5260205b9968c20b6457ed82f48f9e3d6edf2f1f95103161798b73aeccf0/astroid-3.3.10-py3-none-any.whl", hash = "sha256:104fb9cb9b27ea95e847a94c003be03a9e039334a8ebca5ee27dafaf5c5711eb", size = 275388, upload-time = "2025-05-10T13:33:08.391Z" },
] ]
[[package]] [[package]]
@ -120,14 +120,14 @@ wheels = [
[[package]] [[package]]
name = "click" name = "click"
version = "8.1.8" version = "8.2.0"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "colorama", marker = "sys_platform == 'win32'" }, { name = "colorama", marker = "sys_platform == 'win32'" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593, upload-time = "2024-12-21T18:38:44.339Z" } sdist = { url = "https://files.pythonhosted.org/packages/cd/0f/62ca20172d4f87d93cf89665fbaedcd560ac48b465bd1d92bfc7ea6b0a41/click-8.2.0.tar.gz", hash = "sha256:f5452aeddd9988eefa20f90f05ab66f17fce1ee2a36907fd30b05bbb5953814d", size = 235857, upload-time = "2025-05-10T22:21:03.111Z" }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188, upload-time = "2024-12-21T18:38:41.666Z" }, { url = "https://files.pythonhosted.org/packages/a2/58/1f37bf81e3c689cc74ffa42102fa8915b59085f54a6e4a80bc6265c0f6bf/click-8.2.0-py3-none-any.whl", hash = "sha256:6b303f0b2aa85f1cb4e5303078fadcbcd4e476f114fab9b5007005711839325c", size = 102156, upload-time = "2025-05-10T22:21:01.352Z" },
] ]
[[package]] [[package]]
@ -382,11 +382,11 @@ wheels = [
[[package]] [[package]]
name = "platformdirs" name = "platformdirs"
version = "4.3.7" version = "4.3.8"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351", size = 21291, upload-time = "2025-03-19T20:36:10.989Z" } sdist = { url = "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc", size = 21362, upload-time = "2025-05-07T22:47:42.121Z" }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/6d/45/59578566b3275b8fd9157885918fcd0c4d74162928a5310926887b856a51/platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94", size = 18499, upload-time = "2025-03-19T20:36:09.038Z" }, { url = "https://files.pythonhosted.org/packages/fe/39/979e8e21520d4e47a0bbe349e2713c0aac6f3d853d0e5b34d76206c439aa/platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4", size = 18567, upload-time = "2025-05-07T22:47:40.376Z" },
] ]
[[package]] [[package]]
@ -556,16 +556,16 @@ wheels = [
[[package]] [[package]]
name = "virtualenv" name = "virtualenv"
version = "20.31.1" version = "20.31.2"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "distlib" }, { name = "distlib" },
{ name = "filelock" }, { name = "filelock" },
{ name = "platformdirs" }, { name = "platformdirs" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/53/07/655f4fb9592967f49197b00015bb5538d3ed1f8f96621a10bebc3bb822e2/virtualenv-20.31.1.tar.gz", hash = "sha256:65442939608aeebb9284cd30baca5865fcd9f12b58bb740a24b220030df46d26", size = 6076234, upload-time = "2025-05-05T22:45:39.829Z" } sdist = { url = "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af", size = 6076316, upload-time = "2025-05-08T17:58:23.811Z" }
wheels = [ wheels = [
{ url = "https://files.pythonhosted.org/packages/c5/67/7d7559264a6f8ec9ce4e397ddd9157a510be1e174dc98be898b6c18eeef4/virtualenv-20.31.1-py3-none-any.whl", hash = "sha256:f448cd2f1604c831afb9ea238021060be2c0edbcad8eb0a4e8b4e14ff11a5482", size = 6057843, upload-time = "2025-05-05T22:45:37.127Z" }, { url = "https://files.pythonhosted.org/packages/f3/40/b1c265d4b2b62b58576588510fc4d1fe60a86319c8de99fd8e9fec617d2c/virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11", size = 6057982, upload-time = "2025-05-08T17:58:21.15Z" },
] ]
[[package]] [[package]]
@ -606,7 +606,7 @@ dev = [
[package.metadata] [package.metadata]
requires-dist = [ requires-dist = [
{ name = "astroid", specifier = "<=3.3.9" }, { name = "astroid", specifier = "<=3.3.10" },
{ name = "pillow", specifier = ">=11.0.0,<12.0.0" }, { name = "pillow", specifier = ">=11.0.0,<12.0.0" },
{ name = "webex-bot", specifier = ">=0.5.2,<1.0.0" }, { name = "webex-bot", specifier = ">=0.5.2,<1.0.0" },
] ]