├── .gitignore
├── .idea
├── .gitignore
├── inspectionProfiles
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
├── poetry-install.iml
└── vcs.xml
├── action.yml
├── dist
└── index.js
├── index.js
├── package-lock.json
├── package.json
└── readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### macOS template
3 | # General
4 | .DS_Store
5 | .AppleDouble
6 | .LSOverride
7 |
8 | # Icon must end with two \r
9 | Icon
10 |
11 | # Thumbnails
12 | ._*
13 |
14 | # Files that might appear in the root of a volume
15 | .DocumentRevisions-V100
16 | .fseventsd
17 | .Spotlight-V100
18 | .TemporaryItems
19 | .Trashes
20 | .VolumeIcon.icns
21 | .com.apple.timemachine.donotpresent
22 |
23 | # Directories potentially created on remote AFP share
24 | .AppleDB
25 | .AppleDesktop
26 | Network Trash Folder
27 | Temporary Items
28 | .apdisk
29 |
30 | ### JetBrains template
31 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
32 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
33 |
34 | # User-specific stuff
35 | .idea/**/workspace.xml
36 | .idea/**/tasks.xml
37 | .idea/**/usage.statistics.xml
38 | .idea/**/dictionaries
39 | .idea/**/shelf
40 |
41 | # Generated files
42 | .idea/**/contentModel.xml
43 |
44 | # Sensitive or high-churn files
45 | .idea/**/dataSources/
46 | .idea/**/dataSources.ids
47 | .idea/**/dataSources.local.xml
48 | .idea/**/sqlDataSources.xml
49 | .idea/**/dynamic.xml
50 | .idea/**/uiDesigner.xml
51 | .idea/**/dbnavigator.xml
52 |
53 | # Gradle
54 | .idea/**/gradle.xml
55 | .idea/**/libraries
56 |
57 | # Gradle and Maven with auto-import
58 | # When using Gradle or Maven with auto-import, you should exclude module files,
59 | # since they will be recreated, and may cause churn. Uncomment if using
60 | # auto-import.
61 | # .idea/modules.xml
62 | # .idea/*.iml
63 | # .idea/modules
64 | # *.iml
65 | # *.ipr
66 |
67 | # CMake
68 | cmake-build-*/
69 |
70 | # Mongo Explorer plugin
71 | .idea/**/mongoSettings.xml
72 |
73 | # File-based project format
74 | *.iws
75 |
76 | # IntelliJ
77 | out/
78 |
79 | # mpeltonen/sbt-idea plugin
80 | .idea_modules/
81 |
82 | # JIRA plugin
83 | atlassian-ide-plugin.xml
84 |
85 | # Cursive Clojure plugin
86 | .idea/replstate.xml
87 |
88 | # Crashlytics plugin (for Android Studio and IntelliJ)
89 | com_crashlytics_export_strings.xml
90 | crashlytics.properties
91 | crashlytics-build.properties
92 | fabric.properties
93 |
94 | # Editor-based Rest Client
95 | .idea/httpRequests
96 |
97 | # Android studio 3.1+ serialized cache file
98 | .idea/caches/build_file_checksums.ser
99 |
100 | ### Node template
101 | # Logs
102 | logs
103 | *.log
104 | npm-debug.log*
105 | yarn-debug.log*
106 | yarn-error.log*
107 | lerna-debug.log*
108 |
109 | # Diagnostic reports (https://nodejs.org/api/report.html)
110 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
111 |
112 | # Runtime data
113 | pids
114 | *.pid
115 | *.seed
116 | *.pid.lock
117 |
118 | # Directory for instrumented libs generated by jscoverage/JSCover
119 | lib-cov
120 |
121 | # Coverage directory used by tools like istanbul
122 | coverage
123 | *.lcov
124 |
125 | # nyc test coverage
126 | .nyc_output
127 |
128 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
129 | .grunt
130 |
131 | # Bower dependency directory (https://bower.io/)
132 | bower_components
133 |
134 | # node-waf configuration
135 | .lock-wscript
136 |
137 | # Compiled binary addons (https://nodejs.org/api/addons.html)
138 | build/Release
139 |
140 | # Dependency directories
141 | node_modules/
142 | jspm_packages/
143 |
144 | # TypeScript v1 declaration files
145 | typings/
146 |
147 | # TypeScript cache
148 | *.tsbuildinfo
149 |
150 | # Optional npm cache directory
151 | .npm
152 |
153 | # Optional eslint cache
154 | .eslintcache
155 |
156 | # Optional REPL history
157 | .node_repl_history
158 |
159 | # Output of 'npm pack'
160 | *.tgz
161 |
162 | # Yarn Integrity file
163 | .yarn-integrity
164 |
165 | # dotenv environment variables file
166 | .env
167 | .env.test
168 |
169 | # parcel-bundler cache (https://parceljs.org/)
170 | .cache
171 |
172 | # next.js build output
173 | .next
174 |
175 | # nuxt.js build output
176 | .nuxt
177 |
178 | # vuepress build output
179 | .vuepress/dist
180 |
181 | # Serverless directories
182 | .serverless/
183 |
184 | # FuseBox cache
185 | .fusebox/
186 |
187 | # DynamoDB Local files
188 | .dynamodb/
189 |
190 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/poetry-install.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/action.yml:
--------------------------------------------------------------------------------
1 | name: 'Poetry Install'
2 | description: 'Install Poetry and have it then install package dependencies.'
3 | inputs:
4 | create-virtualenv:
5 | description: 'Have poetry create a virtualenv for the project on installation.'
6 | required: false
7 | default: 'false'
8 | runs:
9 | using: 'node12'
10 | main: 'dist/index.js'
11 | branding:
12 | icon: 'arrow-up-circle'
13 | color: 'blue'
14 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | module.exports =
2 | /******/ (function(modules, runtime) { // webpackBootstrap
3 | /******/ "use strict";
4 | /******/ // The module cache
5 | /******/ var installedModules = {};
6 | /******/
7 | /******/ // The require function
8 | /******/ function __webpack_require__(moduleId) {
9 | /******/
10 | /******/ // Check if module is in cache
11 | /******/ if(installedModules[moduleId]) {
12 | /******/ return installedModules[moduleId].exports;
13 | /******/ }
14 | /******/ // Create a new module (and put it into the cache)
15 | /******/ var module = installedModules[moduleId] = {
16 | /******/ i: moduleId,
17 | /******/ l: false,
18 | /******/ exports: {}
19 | /******/ };
20 | /******/
21 | /******/ // Execute the module function
22 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23 | /******/
24 | /******/ // Flag the module as loaded
25 | /******/ module.l = true;
26 | /******/
27 | /******/ // Return the exports of the module
28 | /******/ return module.exports;
29 | /******/ }
30 | /******/
31 | /******/
32 | /******/ __webpack_require__.ab = __dirname + "/";
33 | /******/
34 | /******/ // the startup function
35 | /******/ function startup() {
36 | /******/ // Load entry module and return exports
37 | /******/ return __webpack_require__(63);
38 | /******/ };
39 | /******/
40 | /******/ // run startup
41 | /******/ return startup();
42 | /******/ })
43 | /************************************************************************/
44 | /******/ ({
45 |
46 | /***/ 63:
47 | /***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
48 |
49 | const {execSync} = __webpack_require__(129);
50 |
51 |
52 | console.log('pip install -U pip...');
53 | execSync('pip install -U pip', (error, stdout, stderr) => {
54 | if (error) {
55 | console.error(`execSync error: ${error}`);
56 | return;
57 | }
58 | console.log(`stdout: ${stdout}`);
59 | console.error(`stderr: ${stderr}`);
60 | });
61 |
62 | console.log('pip install poetry...');
63 | execSync('pip install poetry', (error, stdout, stderr) => {
64 | if (error) {
65 | console.error(`execSync error: ${error}`);
66 | return;
67 | }
68 | console.log(`stdout: ${stdout}`);
69 | console.error(`stderr: ${stderr}`);
70 | });
71 |
72 |
73 | console.log('poetry install...');
74 | execSync('poetry install', (error, stdout, stderr) => {
75 | if (error) {
76 | console.error(`execSync error: ${error}`);
77 | return;
78 | }
79 | console.log(`stdout: ${stdout}`);
80 | console.error(`stderr: ${stderr}`);
81 | });
82 |
83 | /***/ }),
84 |
85 | /***/ 129:
86 | /***/ (function(module) {
87 |
88 | module.exports = require("child_process");
89 |
90 | /***/ })
91 |
92 | /******/ });
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const {execSync} = require('child_process');
2 |
3 |
4 | console.log('pip install -U pip...');
5 | execSync('pip install -U pip', (error, stdout, stderr) => {
6 | if (error) {
7 | console.error(`execSync error: ${error}`);
8 | return;
9 | }
10 | console.log(`stdout: ${stdout}`);
11 | console.error(`stderr: ${stderr}`);
12 | });
13 |
14 | console.log('pip install poetry...');
15 | execSync('pip install poetry', (error, stdout, stderr) => {
16 | if (error) {
17 | console.error(`execSync error: ${error}`);
18 | return;
19 | }
20 | console.log(`stdout: ${stdout}`);
21 | console.error(`stderr: ${stderr}`);
22 | });
23 |
24 |
25 | console.log('poetry install...');
26 | execSync('poetry install', (error, stdout, stderr) => {
27 | if (error) {
28 | console.error(`execSync error: ${error}`);
29 | console.error(`stderr: ${stderr}`);
30 | return;
31 | }
32 | console.log(`stdout: ${stdout}`);
33 | console.error(`stderr: ${stderr}`);
34 | });
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "poetry-install",
3 | "version": "2.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@actions/core": {
8 | "version": "1.2.6",
9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
10 | "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "poetry-install",
3 | "version": "2.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/knowsuchagency/poetry-install.git"
12 | },
13 | "keywords": [],
14 | "author": "",
15 | "license": "ISC",
16 | "bugs": {
17 | "url": "https://github.com/knowsuchagency/poetry-install/issues"
18 | },
19 | "homepage": "https://github.com/knowsuchagency/poetry-install#readme",
20 | "dependencies": {
21 | "@actions/core": "^1.2.6"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Poetry Install Action
2 |
3 | This javascript action installs [poetry](poetry) and then invokes it to install project dependencies.
4 |
5 | ## Example usage
6 |
7 | ```yaml
8 | ...
9 | - uses: actions/checkout@v1
10 | - uses: actions/setup-python@v1
11 | - uses: knowsuchagency/poetry-install@v1
12 | env:
13 | POETRY_VIRTUALENVS_CREATE: false
14 | ```
15 |
16 | is a more succinct
17 |
18 | ```yaml
19 | ...
20 | - uses: actions/checkout@v1
21 | - uses: actions/setup-python@v1
22 | - run: |
23 | pip install -U pip
24 | pip install poetry
25 | poetry install
26 | env:
27 | POETRY_VIRTUALENVS_CREATE: false
28 | ```
29 |
30 | [poetry]: https://python-poetry.org
--------------------------------------------------------------------------------