diff --git a/.github/actions/pick/action.yml b/.github/actions/pick/action.yml deleted file mode 100644 index cce59a4..0000000 --- a/.github/actions/pick/action.yml +++ /dev/null @@ -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' diff --git a/.github/actions/pick/index.js b/.github/actions/pick/index.js deleted file mode 100644 index 189d10d..0000000 --- a/.github/actions/pick/index.js +++ /dev/null @@ -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); -} diff --git a/.github/actions/pick/package-lock.json b/.github/actions/pick/package-lock.json deleted file mode 100644 index 3129be8..0000000 --- a/.github/actions/pick/package-lock.json +++ /dev/null @@ -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==" - } - } -} diff --git a/.github/actions/pick/package.json b/.github/actions/pick/package.json deleted file mode 100644 index 35144b7..0000000 --- a/.github/actions/pick/package.json +++ /dev/null @@ -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" - } -} diff --git a/.github/workflows/periodic.yaml b/.github/workflows/periodic.yaml index 1eb8d72..f2c70aa 100644 --- a/.github/workflows/periodic.yaml +++ b/.github/workflows/periodic.yaml @@ -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@3fef15e with: repo: llvm/llvm-project token: ${{ secrets.GITHUB_TOKEN }}