Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
82eddd8828 | |||
6df2a462d1 | |||
3689bd07d7 | |||
943f19ac64 | |||
e59d6c7fff | |||
c65a4f39b3 | |||
2d18371789 |
15
README.md
15
README.md
@ -88,6 +88,21 @@ If there is some reason you need to use `actions/checkout@v1` the following step
|
||||
- run: git checkout "${GITHUB_REF:11}"
|
||||
```
|
||||
|
||||
Checking out a branch from a different repository from where the workflow is executing will make *that repository* the target for the created pull request. In this case, a `repo` scoped [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) is required.
|
||||
|
||||
```yml
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: owner/repo
|
||||
|
||||
# Create changes to pull request here
|
||||
|
||||
- uses: peter-evans/create-pull-request@v2
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
```
|
||||
|
||||
### Branch naming
|
||||
|
||||
For branch naming there are two strategies. Create a fixed-name pull request branch that will be updated with new changes until it is merged or closed, OR, always create a new unique branch each time there are changes to be committed.
|
||||
|
20
dist/index.js
vendored
20
dist/index.js
vendored
@ -1001,18 +1001,34 @@ module.exports = require("os");
|
||||
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
|
||||
|
||||
const { inspect } = __webpack_require__(669);
|
||||
const fs = __webpack_require__(747);
|
||||
const core = __webpack_require__(470);
|
||||
const exec = __webpack_require__(986);
|
||||
const setupPython = __webpack_require__(139);
|
||||
|
||||
function fileExists(path) {
|
||||
try {
|
||||
return fs.statSync(path).isFile();
|
||||
} catch (e) {
|
||||
core.debug(`e: ${inspect(e)}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
// Allows ncc to find assets to be included in the distribution
|
||||
const src = __webpack_require__.ab + "src";
|
||||
core.debug(`src: ${src}`);
|
||||
|
||||
// Setup Python from the tool cache
|
||||
setupPython("3.8.x", "x64");
|
||||
// Check if the platfrom is Alpine Linux
|
||||
const alpineLinux = fileExists("/etc/alpine-release");
|
||||
core.debug(`alpineLinux: ${alpineLinux}`);
|
||||
|
||||
// Skip Python setup if the platform is Alpine Linux
|
||||
if (!alpineLinux)
|
||||
// Setup Python from the tool cache
|
||||
setupPython("3.8.x", "x64");
|
||||
|
||||
// Install requirements
|
||||
await exec.exec("pip", [
|
||||
|
2
dist/src/requirements.txt
vendored
2
dist/src/requirements.txt
vendored
@ -1,2 +1,2 @@
|
||||
GitPython==3.0.5
|
||||
GitPython==3.0.7
|
||||
PyGithub==1.45
|
||||
|
BIN
dist/vendor/GitPython-3.0.5.tar.gz
vendored
BIN
dist/vendor/GitPython-3.0.5.tar.gz
vendored
Binary file not shown.
BIN
dist/vendor/GitPython-3.0.7.tar.gz
vendored
Normal file
BIN
dist/vendor/GitPython-3.0.7.tar.gz
vendored
Normal file
Binary file not shown.
20
index.js
20
index.js
@ -1,16 +1,32 @@
|
||||
const { inspect } = require("util");
|
||||
const fs = require("fs");
|
||||
const core = require("@actions/core");
|
||||
const exec = require("@actions/exec");
|
||||
const setupPython = require("./src/setup-python");
|
||||
|
||||
function fileExists(path) {
|
||||
try {
|
||||
return fs.statSync(path).isFile();
|
||||
} catch (e) {
|
||||
core.debug(`e: ${inspect(e)}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
// Allows ncc to find assets to be included in the distribution
|
||||
const src = __dirname + "/src";
|
||||
core.debug(`src: ${src}`);
|
||||
|
||||
// Setup Python from the tool cache
|
||||
setupPython("3.8.x", "x64");
|
||||
// Check if the platfrom is Alpine Linux
|
||||
const alpineLinux = fileExists("/etc/alpine-release");
|
||||
core.debug(`alpineLinux: ${alpineLinux}`);
|
||||
|
||||
// Skip Python setup if the platform is Alpine Linux
|
||||
if (!alpineLinux)
|
||||
// Setup Python from the tool cache
|
||||
setupPython("3.8.x", "x64");
|
||||
|
||||
// Install requirements
|
||||
await exec.exec("pip", [
|
||||
|
@ -1,2 +1,2 @@
|
||||
GitPython==3.0.5
|
||||
GitPython==3.0.7
|
||||
PyGithub==1.45
|
||||
|
Reference in New Issue
Block a user