build(deps-dev): bump wrapt from 1.16.0 to 1.17.0 (#191) #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
packages: | |
permissions: | |
attestations: write | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install build==1.2.1 | |
- run: python -m build | |
- name: generate build provenance | |
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4 | |
with: | |
subject-path: "${{ github.workspace }}/dist/*" | |
- name: Upload Packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages | |
path: | | |
dist/*.whl | |
dist/*tar.gz | |
publish-pypi: | |
needs: | |
- packages | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
path: dist | |
- name: Upload pypi.org | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 | |
with: | |
repository-url: https://upload.pypi.org/legacy/ | |
publish-docker: | |
needs: | |
- packages | |
runs-on: ubuntu-latest | |
permissions: | |
attestations: write | |
id-token: write | |
contents: write | |
env: | |
DOCKER_IMAGE_NAME: docker.elastic.co/observability/elastic-otel-python | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Log in to the Elastic Container registry | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }} | |
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }} | |
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
path: dist | |
- name: Extract metadata (tags, labels) | |
id: docker-meta | |
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | |
with: | |
images: ${{ env.DOCKER_IMAGE_NAME }} | |
tags: | | |
type=semver,pattern={{version}} | |
# "edge" Docker tag on git push to default branch | |
type=edge | |
labels: | | |
org.opencontainers.image.vendor=Elastic | |
org.opencontainers.image.title=elastic-otel-python | |
org.opencontainers.image.description=Elastic Distribution of OpenTelemetry Python | |
- name: Build and push image | |
id: docker-push | |
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
file: operator/Dockerfile | |
tags: ${{ steps.docker-meta.outputs.tags }} | |
labels: ${{ steps.docker-meta.outputs.labels }} | |
build-args: | | |
DISTRO_DIR=./dist/ | |
- name: generate build provenance (containers) | |
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4 | |
with: | |
subject-name: "${{ env.DOCKER_IMAGE_NAME }}" | |
subject-digest: ${{ steps.docker-push.outputs.digest }} | |
push-to-registry: true |