Skip to content

Commit 827c327

Browse files
committed
Trigger pypi workflow from pci update only on release creation
1 parent d917095 commit 827c327

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

.github/workflows/pci-update-workflow.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
14+
with:
15+
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
1416
steps:
1517
- uses: actions/checkout@v4
1618
with:
@@ -133,6 +135,10 @@ jobs:
133135
git add pci.ids.sha256 torchruntime/gpu_pci_ids.db pyproject.toml
134136
git commit -m "Update PCI database, raw data file and version"
135137
138+
- name: Push changes
139+
if: steps.check_db_diff.outputs.has_changes == 'true'
140+
run: git push
141+
136142
- name: Create Release
137143
if: steps.check_db_diff.outputs.has_changes == 'true'
138144
uses: softprops/action-gh-release@v1
@@ -143,17 +149,3 @@ jobs:
143149
Automatic update of PCI database. Install using `pip install --upgrade torchruntime==${{ steps.update_version.outputs.new_version }}`
144150
145151
${{ env.DIFF_OUTPUT }}
146-
draft: false
147-
prerelease: false
148-
149-
- name: Push changes
150-
if: steps.check_db_diff.outputs.has_changes == 'true'
151-
run: git push && git push --tags
152-
153-
- name: Cleanup
154-
if: always()
155-
run: rm -f pci.ids.new
156-
157-
- name: Wait
158-
if: always()
159-
run: sleep 5 # seconds

.github/workflows/pypi-release-workflow.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ on:
66
release:
77
types:
88
- created
9-
workflow_run:
10-
workflows:
11-
- Update PCI Database
12-
types:
13-
- completed
149
workflow_dispatch:
1510
jobs:
1611
build:

0 commit comments

Comments
 (0)