Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
49674d5
Readme, package.json, changesets, and README
jaredly May 18, 2022
8d8993d
Bring over our composite actions from Khan/perseus
jaredly May 18, 2022
2ecc423
Add scripts to build & publish our github actions, to 'bare tags' in …
jaredly May 18, 2022
2e88c2a
cs
jaredly May 18, 2022
90912bc
cs
jaredly May 18, 2022
9872ee4
move to utils
jaredly May 19, 2022
83543dd
Add eslint & prettier
jaredly May 19, 2022
569baa0
action
jaredly May 19, 2022
ba2bf81
separate run
jaredly May 19, 2022
b39f5e0
refactor out the tricky bit
jaredly May 19, 2022
feb1417
Merge branch 'publish' into lints
jaredly May 19, 2022
753d6f7
fix
jaredly May 19, 2022
b36e072
lint
jaredly May 19, 2022
45ad3b3
Merge branch 'main' into publish
jaredly May 19, 2022
a4eee22
fix
jaredly May 19, 2022
3b4a112
ok
jaredly May 19, 2022
bcd4999
Merge branch 'main' into lints
jaredly May 19, 2022
6497194
cs
jaredly May 19, 2022
1538ebf
Add major version tags, to allow implicit upgrades for patch & minor …
jaredly May 19, 2022
8e90c0e
cs
jaredly May 19, 2022
99cf14d
gerald it up
jaredly May 19, 2022
55c1182
ok
jaredly May 19, 2022
35b2050
hm
jaredly May 19, 2022
61f58ae
checkout
jaredly May 19, 2022
43dc211
oh base
jaredly May 19, 2022
73500fc
tokens
jaredly May 19, 2022
ea6aaf2
empty not
jaredly May 19, 2022
7cbb474
ugh
jaredly May 19, 2022
17b2e0b
ughh
jaredly May 19, 2022
75f8a88
rename
jaredly May 19, 2022
5bad143
cleanup
jaredly May 19, 2022
c0180eb
lint
jaredly May 19, 2022
c7d6bc8
Merge branch 'main' into gerald
jaredly May 19, 2022
657910f
fix
jaredly May 19, 2022
4e260e9
backout
jaredly May 19, 2022
45beacc
Use the local versions of our actions in our workflows, and add jest
jaredly May 19, 2022
da78a0d
cs
jaredly May 19, 2022
5af0f3a
Update utils/build.mjs
jaredly May 19, 2022
b53a8e5
Merge branch 'main' into use-local
jaredly May 19, 2022
073c5d5
Merge branch 'use-local' of github.com:Khan/actions into use-local
jaredly May 19, 2022
cd1923f
lint
jaredly May 19, 2022
d878159
fix
jaredly May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/tender-weeks-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
rules: basicRules,
env: {
node: true,
jest: true,
},
parserOptions: {
sourceType: "module",
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn.lock binary linguist-generated
4 changes: 2 additions & 2 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Khan/actions@check-for-changeset-v0.0.0
- uses: Khan/actions@shared-node-cache-v0.0.2
- uses: ./actions/check-for-changeset
- uses: ./actions/shared-node-cache
- run: yarn lint
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,9 @@ on:
jobs:
release:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- uses: ./actions/shared-node-cache
- name: Publish as git tags
run: node utils/run-publish.mjs
2 changes: 1 addition & 1 deletion actions/full-or-limited/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
- name: Limited run
if: inputs.full-trigger == '[]' && inputs.limited-trigger != '[]'
# Will be replaced with a pinned version by our build system
uses: json-args
uses: ./actions/json-args
with:
list: ${{ inputs.limited-trigger }}
run: ${{ inputs.limited }}
2 changes: 1 addition & 1 deletion actions/gerald-pr/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "gerald",
"name": "gerald-pr",
"version": "0.0.0"
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
],
"scripts": {
"lint": "eslint --ext .js,.mjs .",
"fix": "yarn lint --fix"
"fix": "yarn lint --fix",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --testRegex '.*.test.mjs'"
},
"devDependencies": {
"@changesets/cli": "^2.22.0",
"@khanacademy/eslint-config": "^0.1.0",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"@khanacademy/eslint-config": "^0.1.0",
"jest": "^28.1.0",
"prettier": "^2.6.2"
}
}
4 changes: 2 additions & 2 deletions utils/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const processActionYml = (
const replacements = [];
Object.keys(packageJsons[name].dependencies).forEach((depName) => {
replacements.push({
from: new RegExp(`\\buses: ${depName}\\b`, "g"),
to: `uses: ${monorepoName}#${depName}-v${packageJsons[depName].version}`,
from: new RegExp(`\\buses: \\./actions/${depName}\\b`, "g"),
to: `uses: ${monorepoName}@${depName}-v${packageJsons[depName].version}`,
});
});
replacements.forEach(({from, to}) => {
Expand Down
45 changes: 45 additions & 0 deletions utils/build.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import {processActionYml} from "./build.mjs";

describe("processActionYml", () => {
it("should work", () => {
const before = `
name: Example
description: Do a thing
runs:
using: "composite"
steps:
- name: Limited run
uses: ./actions/json-args
`;
expect(
processActionYml(
`full-or-limited`,
{
"full-or-limited": {
version: "0.1.2",
dependencies: {
"json-args": "*",
},
},

"json-args": {
version: "1.2.3",
},
},

before,
"Our/monorepo",
),
).toMatchInlineSnapshot(`
"
name: Example
description: Do a thing
runs:
using: \\"composite\\"
steps:
- name: Limited run
uses: Our/monorepo@json-args-v1.2.3
"
`);
});
});
Loading