mirror of
https://github.com/clangd/clangd.git
synced 2024-12-04 21:17:10 +00:00
Pull "pick" action into clangd/actions (#552)
This commit is contained in:
parent
d1d8b39c4c
commit
5a40c019f1
15
.github/actions/pick/action.yml
vendored
15
.github/actions/pick/action.yml
vendored
@ -1,15 +0,0 @@
|
||||
name: 'Pick commit'
|
||||
description: 'Pick last successful commit from a repo'
|
||||
inputs:
|
||||
repo:
|
||||
description: 'Github repository e.g. llvm/llvm-project'
|
||||
required: true
|
||||
token:
|
||||
description: 'Github auth token'
|
||||
required: true
|
||||
outputs:
|
||||
sha:
|
||||
description: 'The SHA1 of the picked commit'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'index.js'
|
18
.github/actions/pick/index.js
vendored
18
.github/actions/pick/index.js
vendored
@ -1,18 +0,0 @@
|
||||
const core = require('@actions/core');
|
||||
const last = require('last-successful-gh-commit').default;
|
||||
try {
|
||||
var parts = core.getInput('repo').split('/', 2);
|
||||
last({
|
||||
owner: parts[0],
|
||||
name: parts[1],
|
||||
token: core.getInput('token'),
|
||||
})
|
||||
.then(commit => core.setOutput('sha', commit.node.oid))
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
core.setFailed(error.message);
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
core.setFailed(error.message);
|
||||
}
|
56
.github/actions/pick/package-lock.json
generated
vendored
56
.github/actions/pick/package-lock.json
generated
vendored
@ -1,56 +0,0 @@
|
||||
{
|
||||
"name": "pick",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
||||
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.16.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz",
|
||||
"integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.2.3",
|
||||
"is-buffer": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.2.6",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz",
|
||||
"integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==",
|
||||
"requires": {
|
||||
"debug": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
},
|
||||
"last-successful-gh-commit": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/last-successful-gh-commit/-/last-successful-gh-commit-1.0.1.tgz",
|
||||
"integrity": "sha1-8Mn8HfEvb764g/5vrcy3W4p5EVo=",
|
||||
"requires": {
|
||||
"axios": "^0.16.2"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
}
|
||||
}
|
||||
}
|
14
.github/actions/pick/package.json
vendored
14
.github/actions/pick/package.json
vendored
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "pick",
|
||||
"version": "1.0.0",
|
||||
"description": "Pick the last successful commit from a github repo",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "sam.mccall@gmail.com",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"last-successful-gh-commit": "^1.0.1"
|
||||
}
|
||||
}
|
4
.github/workflows/periodic.yaml
vendored
4
.github/workflows/periodic.yaml
vendored
@ -23,11 +23,9 @@ jobs:
|
||||
steps:
|
||||
- name: Clone scripts
|
||||
uses: actions/checkout@v2
|
||||
- name: Install NPM dependencies
|
||||
run: npm install --prefix .github/actions/pick
|
||||
- name: Pick last successful commit
|
||||
id: pick
|
||||
uses: ./.github/actions/pick
|
||||
uses: clangd/actions/.github/actions/pick@v0.1.0
|
||||
with:
|
||||
repo: llvm/llvm-project
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user