diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7e5f1bd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,35 @@ +version: 2 + +updates: +- package-ecosystem: uv + directory: / + schedule: + interval: weekly + day: sunday + time: '09:00' + groups: + uv-deps: + applies-to: version-updates + patterns: + - '*' + uv-security: + applies-to: security-updates + patterns: + - '*' + +- package-ecosystem: github-actions + directories: + - / + schedule: + interval: weekly + day: sunday + time: '09:00' + groups: + github-deps: + applies-to: version-updates + patterns: + - '*' + github-security: + applies-to: security-updates + patterns: + - '*' diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml index 2d9e141..760a631 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/actionlint.yaml @@ -6,24 +6,9 @@ on: paths: - '.github/workflows/**' -# Automatically cancel in-progress actions on the same branch -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} - cancel-in-progress: true - permissions: contents: read jobs: actionlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install action linter - run: | - mkdir -p "$HOME"/.local/bin - curl -sL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash -s -- latest "$HOME"/.local/bin - - - name: Check that all workflows are valid - run: actionlint -verbose + uses: unikraft-cloud/x/.github/workflows/actionlint.yaml@prod-staging diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 46a6f14..860b256 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -2,80 +2,12 @@ name: check/pr on: pull_request: - types: [opened, synchronize, reopened] + types: [opened, synchronize, reopened, edited] branches: [prod-staging] permissions: contents: read jobs: - commits: - runs-on: ubuntu-latest - steps: - - name: format - if: always() - uses: taskmedia/action-conventional-commits@v1.1.20 - with: - types: "build|ci|docs|feat|fix|perf|refactor|style|test|revert|gomod|chore|sync" - token: ${{ secrets.GH_PAT }} - - - name: length - if: ${{ github.actor != 'dependabot' && github.actor != 'dependabot[bot]' }} - uses: gsactions/commit-message-checker@v2 - with: - pattern: '((^(?=(?:.|\n)*(?:^|\n)\[\d\]: .{69,}(?:$|\n)(?:.|\n)*)(?:.|\n)*$)|(^(?!(?:.|\n)*(?:^|\n).{74,}(?:$|\n)(?:.|\n)*)(?:.|\n)*$))' - flags: '' - error: 'The maximum line length of 74 characters is exceeded.' - excludeDescription: 'true' - excludeTitle: 'true' - checkAllCommitMessages: 'true' - accessToken: ${{ secrets.GH_PAT }} - - - name: signed-off-by - if: always() - uses: gsactions/commit-message-checker@v2 - with: - pattern: '^Signed-off-by: .+ \<.+\@.+\..+\>$' - error: 'Signed-off-by line is missing.' - excludeDescription: 'true' - excludeTitle: 'true' - checkAllCommitMessages: 'true' - accessToken: ${{ secrets.GH_PAT }} - - pr: - runs-on: ubuntu-latest - steps: - - name: title-format - if: always() - uses: gsactions/commit-message-checker@v2 - with: - pattern: '^(build|ci|docs|feat|fix|perf|refactor|style|test|revert|gomod|chore|sync)(\([\w\-\_\d]+\))?!?: ' - error: 'The PR title must follow the conventional commits format.' - excludeDescription: 'true' - excludeTitle: 'false' - checkAllCommitMessages: 'false' - accessToken: ${{ secrets.GH_PAT }} - - - name: title-length - if: ${{ github.actor != 'dependabot' && github.actor != 'dependabot[bot]' }} - uses: gsactions/commit-message-checker@v2 - with: - pattern: '^(?!.{75,}).*' - flags: '' - error: 'The maximum line length of 75 characters is exceeded.' - excludeDescription: 'true' - excludeTitle: 'false' - checkAllCommitMessages: 'false' - accessToken: ${{ secrets.GH_PAT }} - - - name: description - if: ${{ github.actor != 'dependabot' && github.actor != 'dependabot[bot]' }} - uses: gsactions/commit-message-checker@v2 - with: - pattern: '^\S+( \S+)*$' - error: 'The PR description must not be empty.' - flags: 'gm' - excludeDescription: 'false' - excludeTitle: 'true' - checkAllCommitMessages: 'false' - accessToken: ${{ secrets.GH_PAT }} + check-pr: + uses: unikraft-cloud/x/.github/workflows/check-pr.yaml@prod-staging diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b6d7456..ce057d5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,11 +17,12 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0 with: + version: 0.13.8 enable-cache: true - name: Sync dependencies @@ -43,11 +44,12 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0 with: + version: 0.13.8 enable-cache: true - name: Run the test suite diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml new file mode 100644 index 0000000..42e7bb0 --- /dev/null +++ b/.github/workflows/promote.yaml @@ -0,0 +1,15 @@ +name: promote + +on: + push: + branches: [prod-staging] + workflow_dispatch: + +permissions: + contents: read + +jobs: + promote: + uses: unikraft-cloud/x/.github/workflows/promote.yaml@prod-staging + secrets: + gh_pat: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/publish-pypi.yaml b/.github/workflows/publish-pypi.yaml index bb9f99a..328b2dd 100644 --- a/.github/workflows/publish-pypi.yaml +++ b/.github/workflows/publish-pypi.yaml @@ -17,11 +17,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0 with: + version: 0.13.8 enable-cache: true - name: Check the tag and the package agree on the version @@ -46,10 +47,10 @@ jobs: run: uv build - name: Check metadata - run: uvx twine check dist/* + run: uvx twine@7.0.0 check dist/* - name: Upload build artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: dist path: dist/ @@ -64,10 +65,10 @@ jobs: id-token: write steps: - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: name: dist path: dist/ - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml deleted file mode 100644 index 393a105..0000000 --- a/.github/workflows/release-stable.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: release-stable - -on: - push: - branches: - - prod-staging - -permissions: - deployments: write - contents: read - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - ref: prod-stable - - - name: Reset promotion branch - run: | - git fetch origin prod-staging:prod-staging - git reset --hard prod-staging - - - name: Create pull request - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GH_PAT }} - base: prod-stable - title: "release: Merge latest prod-staging changes to prod-stable" - branch: prod-staging diff --git a/.github/workflows/sync.yaml b/.github/workflows/sync.yaml index 0e75889..a533e2d 100644 --- a/.github/workflows/sync.yaml +++ b/.github/workflows/sync.yaml @@ -21,18 +21,19 @@ jobs: sync: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: ref: ${{ inputs.channel }} - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 with: - go-version: stable + go-version: 1.27.4 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0 with: + version: 0.13.8 enable-cache: true - name: Generate @@ -54,12 +55,12 @@ jobs: echo "name=${BRANCH}" >>"${GITHUB_OUTPUT}" - name: Create pull request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 with: token: ${{ secrets.GH_PAT }} base: ${{ inputs.channel }} - commit-message: "sync: Update Python SDK from OpenAPI spec" - title: "sync: Update Python SDK from OpenAPI spec" + commit-message: "chore: Update Python SDK from OpenAPI spec" + title: "chore: Update Python SDK from OpenAPI spec" branch: ${{ steps.id.outputs.name }} committer: Unikraft Bot author: Unikraft Bot diff --git a/uv.lock b/uv.lock index af493e1..3a5dc92 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 5 requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.15'", @@ -104,11 +104,11 @@ wheels = [ [[package]] name = "certifi" -version = "2026.7.22" +version = "2026.10.18" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/eb/a2aa1ac3ea30dd3f30ca57f40232138b6b0040719316ecb85daf61167771/certifi-2026.10.18.tar.gz", hash = "sha256:b9995d97b64d0431a5af837d8ca8cd6238104d1f319f04bd93ea43124d6c861e", size = 135227, upload-time = "2026-10-18T16:21:07.655Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, + { url = "https://files.pythonhosted.org/packages/08/ba/95dd616042484f7c83a06974388b37b837732740ee70bc5dc715b5fcd55a/certifi-2026.10.18-py3-none-any.whl", hash = "sha256:73191c47aaa79da394e8fee2dbc2ec827432cab56311122c9e47abf79e390f62", size = 134093, upload-time = "2026-10-18T16:21:06.276Z" }, ] [[package]]