FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cfv/.github/workflows/ci-python3-dependencies.yml at python3 · cfv-project/cfv · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cfv-project
/
cfv
Public
Notifications
You must be signed in to change notification settings
Fork
14
Star
75
Code
Issues
12
Pull requests
6
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cfv
/
.github
/
workflows
/
ci-python3-dependencies.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
61 lines (52 loc) · 2.3 KB
Breadcrumbs
cfv
/
.github
/
workflows
/
ci-python3-dependencies.yml
Copy path
File metadata and controls
61 lines (52 loc) · 2.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
This is a basic workflow to help you get started with Actions
name
:
CI python3 Dependencies
#
Controls when the action will run. Triggers the workflow on push or pull request
#
events but only for the master branch
on
:
workflow_dispatch
:
schedule
:
-
cron
:
'
37 15 * * 5
'
permissions
:
issues
:
write
#
A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs
:
#
This workflow contains a single job called "build"
test
:
#
The type of runner that the job will run on
runs-on
:
ubuntu-latest
#
Steps represent a sequence of tasks that will be executed as part of the job
steps
:
-
name
:
Create GitHub issue if new Python minor version is available
uses
:
actions/github-script@v7
with
:
script
:
|
// Get latest Python minor version
const pythonVersions = await fetch('https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json')
.then(response => response.json())
.then(data => data.map(pythonVersion => pythonVersion.version))
.then(pythonVersions => pythonVersions.sort((a, b) => b.localeCompare(a, undefined, { numeric: true })))
const latestPythonMinorVersion = pythonVersions[0].split('.').slice(0, 2).join('.')
// Check if new Python minor version exists
if (latestPythonMinorVersion === '3.15') {
return
}
console.log('New Python minor version detected: ' + latestPythonMinorVersion)
// Check if Github issue already exists
const issueTitle = 'Add support for Python ' + latestPythonMinorVersion
const issues = await github.paginate(github.rest.issues.listForRepo, {
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
})
const existingIssue = issues.find(issue => issue.title === issueTitle)
if (existingIssue) {
console.log('Issue already exists')
return
}
// Create new Github issue
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: issueTitle,
})
console.log('New Github issue created')
Back
|
FazBrowse Home
|
New Git URL