Skip to content

chore(deps): bump docker/build-push-action from 6.17.0 to 6.18.0 in the actions group #19

chore(deps): bump docker/build-push-action from 6.17.0 to 6.18.0 in the actions group

chore(deps): bump docker/build-push-action from 6.17.0 to 6.18.0 in the actions group #19

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
workflow_dispatch:
inputs:
force_publish_pypi:
description: "Bypass check to see if action is run on tag and attempt to publish"
type: boolean
default: false
override_uv_version:
description: "Build with a specific version"
type: string
default: ""
ref:
description: "ref to run CI against, if different than selected branch"
type: string
default: ""
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || github.ref }}
fetch-depth: 0
- name: Read .tool-versions
uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
id: versions
- name: Install a specific version of uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
with:
version: "${{ steps.versions.outputs.uv }}"
python-version: "${{ steps.versions.outputs.python }}"
enable-cache: true
- name: Install dependencies
run: uv sync --frozen
- name: Test with pytest
run: make test
- name: Archive test_logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: test-logs
path: test_logs/
retention-days: 7
- name: Build wheels
env:
UV_DYNAMIC_VERSIONING_BYPASS: ${{ inputs.override_uv_version }}
run: uv build
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: sdk-build
path: dist/
retention-days: 1
verify-build:
needs: [build]
strategy:
fail-fast: false
matrix:
version: ["3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: sdk-build
path: .github/data/dist/
- name: verify download
run: ls -la .github/data/dist/
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .github/data/
build-args: |
IMAGE=python:${{ matrix.version }}-slim
release-build:
if: ${{ (startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch') || inputs.force_publish_pypi }}
needs: [verify-build]
runs-on: ubuntu-latest
steps:
- name: Check if version if valid for publishing
if: ${{ inputs.force_publish_pypi && !startsWith(inputs.ref, 'refs/tags/') }}
run: |
VERSION=${{ inputs.override_uv_version }}
if [ -z "${VAR}" ]; then
echo "Version override not set, continuing... "
elif ! $(echo "$VERSION" | grep -q '[a-zA-Z]'); then
cat << EOF
Version '${VERSION}' in pyproject.toml is major version.
Force publishing is only supported for pre-release versions.
Please create a tag in order to perform a release.
See here for versioning information: https://packaging.python.org/en/latest/discussions/versioning/
EOF
exit 1
else
echo "Version '${VERSION}' in pyproject.toml is pre-release, continuing... "
fi
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ inputs.ref || github.ref }}
- name: Read .tool-versions
uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
id: versions
- name: Install a specific version of uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
with:
version: "${{ steps.versions.outputs.uv }}"
python-version: "${{ steps.versions.outputs.python }}"
enable-cache: true
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: sdk-build
path: dist/
- name: Create release and upload assets
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name != 'workflow_dispatch' }}
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
with:
files: dist/f5_ai_gateway_sdk*
generate_release_notes: true
- name: Publish to Artifactory
if: ${{ startsWith(github.ref, 'refs/tags/') || inputs.force_publish_pypi }}
run: |
mkdir -p ~/.config/uv
cat <<EOF > ~/.config/uv/uv.toml
[[index]]
name = "f5-artifactory"
url = "https://${{ secrets.ARTIFACTORY_HOST }}/artifactory/api/pypi/f5-aigw-pypi/simple"
publish-url = "https://${{ secrets.ARTIFACTORY_HOST }}/artifactory/api/pypi/f5-aigw-pypi"
explicit = true
EOF
uv publish --index f5-artifactory --username ${{ secrets.ARTIFACTORY_USER }} --password ${{ secrets.ARTIFACTORY_PASSWORD }}