Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: cleaning and deploy jfrog-related publication reusable wokflow #31

Merged
merged 2 commits into from
Sep 26, 2024
Merged
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
50 changes: 14 additions & 36 deletions .github/workflows/publish-to-jfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,22 @@
name: Upload Python Package to jfrog

on:
release:
types: [released]
workflow_dispatch:
push:
branches:
- main

jobs:
deploy:
runs-on: outpost-os-shared-small
environment: ledger-publish

publish:
permissions:
id-token: write
contents: read

steps:
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build
run: |
pip install build
- name: Checkout code
uses: actions/checkout@v4
- name: build package
run: python3 -m build .
- name: Login to JFrog Ledger
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1
- name: set jfrog Repo URL
run: jf pip-config --repo-resolve=${{ secrets.JFROG_PYPI_REPO_URL }}
- name: upload package
run: jf rt u dist/ --build-name=dts-util-devel --build-number=1 --module=dts-utils
- name: Attest
id: attest
uses: LedgerHQ/actions-security/actions/attest@actions/attest-1
with:
subject-path: 'dist/*'
push-to-registry: true
- name: test install from jfrog
run: |
jf pip install dts-utils
pip show dts-utils
attestations: write
uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main
with:
environment: ledger-publish
runner: outpost-os-shared-small
python-version: '3.10'
build-name: dts-utils-dev
module-name: dts-utils
repo-name: outpost-pypi-dev-green
virtual-repo-name: outpost-pypi-virtual-green
25 changes: 25 additions & 0 deletions .github/workflows/release-to-jfrog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2024 Ledger SAS
#
# SPDX-License-Identifier: Apache-2.0

name: Upload Python Package to jfrog

on:
release:
types: [released]

jobs:
release:
permissions:
id-token: write
contents: read
attestations: write
uses: outpost-os/pipeline-python/.github/workflows/publish.yml@main
with:
environment: ledger-publish
runner: outpost-os-shared-small
python-version: '3.10'
build-name: dts-utils-dev
module-name: dts-utils
repo-name: outpost-pypi-prod-public
virtual-repo-name: outpost-pypi-virtual-green