Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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:
- '*'
17 changes: 1 addition & 16 deletions .github/workflows/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
74 changes: 3 additions & 71 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
13 changes: 7 additions & 6 deletions .github/workflows/publish-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand All @@ -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
32 changes: 0 additions & 32 deletions .github/workflows/release-stable.yaml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <monkey@unikraft.io>
author: Unikraft Bot <monkey@unikraft.io>
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading