-
Notifications
You must be signed in to change notification settings - Fork 18
Project init #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bharathkkb
merged 28 commits into
google-github-actions:main
from
FrodoTheTrue:action-init
Apr 14, 2022
Merged
Project init #1
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
b637920
project init
FrodoTheTrue 631feea
remove entrypoint
FrodoTheTrue 51049a6
add space
FrodoTheTrue 42fe201
add space
FrodoTheTrue 3e5990c
review fixes
FrodoTheTrue 23e9163
action update
FrodoTheTrue 62ed46d
change workflows
FrodoTheTrue c119f76
remove access token flag
FrodoTheTrue aa8dfcf
review update
FrodoTheTrue a102004
put ssh keys to env
FrodoTheTrue ebc519d
add basic readme
FrodoTheTrue 44ebf17
update 3
FrodoTheTrue 17e467c
update 4
FrodoTheTrue 79a3883
update 5
FrodoTheTrue 96153a9
update 6
FrodoTheTrue a0c1de0
update 7
FrodoTheTrue 9768544
update 8
FrodoTheTrue be165b2
update 9
FrodoTheTrue e200957
update 10
FrodoTheTrue 7006088
update 11
FrodoTheTrue 1088e0a
update 11
FrodoTheTrue fe8f040
update 12
FrodoTheTrue bdbf3f3
update 13
FrodoTheTrue 1ee4485
add unit tests
FrodoTheTrue ccc16fe
add label/release workflows
FrodoTheTrue eded7ec
update ssh key reding
FrodoTheTrue c0f650f
update review nits
FrodoTheTrue d705179
update comments
FrodoTheTrue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Copyright 2022 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the 'License'); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an 'AS IS' BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| module.exports = { | ||
| root: true, | ||
| parser: '@typescript-eslint/parser', | ||
| plugins: ['@typescript-eslint'], | ||
| extends: [ | ||
| 'eslint:recommended', | ||
| 'plugin:@typescript-eslint/eslint-recommended', | ||
| 'plugin:@typescript-eslint/recommended', | ||
| 'plugin:prettier/recommended', | ||
| ], | ||
| rules: { | ||
| '@typescript-eslint/camelcase': 'off', | ||
| '@typescript-eslint/no-non-null-assertion': 'off', | ||
| } | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| commit-message: | ||
| prefix: "chore(deps): " | ||
| rebase-strategy: "disabled" | ||
| schedule: | ||
| interval: "daily" | ||
| ignore: | ||
| - dependency-name: "*" | ||
| update-types: ["version-update:semver-patch", "version-update:semver-minor"] # Security updates are unaffected by this setting | ||
|
|
||
| - package-ecosystem: "npm" | ||
| directory: "/example-app" | ||
| commit-message: | ||
| prefix: "chore(deps): " | ||
| schedule: | ||
| interval: "monthly" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Copyright 2022 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: 'label' | ||
|
|
||
| on: 'pull_request_target' | ||
|
|
||
| jobs: | ||
| apply-label: | ||
| if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - uses: 'actions/github-script@v3' | ||
| with: | ||
| github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
| script: |- | ||
| github.issues.addLabels({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| labels: ['Fork'] | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # Copyright 2022 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: 'release' | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| # build compiles the code and creates a pull request of the compiled result if | ||
| # there is a diff. | ||
| build: | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - uses: 'actions/checkout@v3' | ||
|
|
||
| - uses: 'actions/setup-node@v3' | ||
| with: | ||
| node-version: '16.x' | ||
|
|
||
| - name: 'npm build' | ||
| run: 'npm ci && npm run build' | ||
|
|
||
| - name: 'Create pull request' | ||
| uses: 'peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a' | ||
| with: | ||
| token: '${{ secrets.ACTIONS_BOT_TOKEN }}' | ||
| add-paths: 'dist/' | ||
| committer: 'google-github-actions-bot <github-actions-bot@google.com>' | ||
| author: 'google-github-actions-bot <github-actions-bot@google.com>' | ||
| signoff: 'google-github-actions-bot <github-actions-bot@google.com>' | ||
| commit-message: 'Build dist' | ||
| title: 'chore: build dist' | ||
| body: 'Build compiled Typescript' | ||
| base: 'main' | ||
| branch: 'actions/build' | ||
| push-to-fork: 'google-github-actions-bot/ssh-compute' | ||
| delete-branch: true | ||
|
|
||
| # create-pull-request creates a release pull request if there are any | ||
| # convential commit changes since the last release. | ||
| create-pull-request: | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - uses: 'google-github-actions/release-please-action@v2' | ||
| with: | ||
| token: '${{ secrets.ACTIONS_BOT_TOKEN }}' | ||
| release-type: 'node' | ||
| bump-minor-pre-major: true | ||
| command: 'release-pr' | ||
| fork: true | ||
|
|
||
| # release does a release on the merge of the release pull request. It also | ||
| # updates the floating tag alias for the major version. | ||
| release: | ||
| runs-on: 'ubuntu-latest' | ||
| steps: | ||
| - id: 'release' | ||
| uses: 'google-github-actions/release-please-action@v2' | ||
| with: | ||
| release-type: 'node' | ||
| bump-minor-pre-major: true | ||
| command: 'github-release' | ||
|
|
||
| - name: 'Update floating tag' | ||
| if: '${{ steps.release.outputs.release_created }}' | ||
| uses: 'actions/github-script@v5' | ||
| with: | ||
| script: |- | ||
| const sha = '${{ steps.release.outputs.sha }}' | ||
| const major = 'v${{ steps.release.outputs.major }}'; | ||
| // Try to update the ref first. If that fails, it probably does not | ||
| // exist yet, and we should create it. | ||
| try { | ||
| await github.rest.git.updateRef({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| ref: `tags/${major}`, | ||
| sha: sha, | ||
| force: true, | ||
| }); | ||
| core.info(`Updated ${major} to ${sha}`); | ||
| } catch(err) { | ||
| core.warning(`Failed to create ${major}: ${err}`); | ||
| await github.rest.git.createRef({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| ref: `refs/tags/${major}`, | ||
| sha: sha, | ||
| }); | ||
| core.info(`Created ${major} at ${sha}`); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Copyright 2022 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: 'unit' | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| pull_request: | ||
| branches: | ||
| - 'main' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| run: | ||
| name: 'unit' | ||
| runs-on: '${{ matrix.os }}' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: | ||
| - 'ubuntu-latest' | ||
| - 'windows-latest' | ||
| - 'macos-latest' | ||
| steps: | ||
| - uses: 'actions/checkout@v3' | ||
|
|
||
| - uses: 'actions/setup-node@v3' | ||
| with: | ||
| node-version: '16.x' | ||
|
|
||
| - name: 'npm build' | ||
| run: 'npm ci && npm run build' | ||
|
|
||
| - name: 'npm lint' | ||
| # There's no need to run the linter for each operating system, since it | ||
| # will find the same thing 3x and clog up the PR review. | ||
| if: ${{matrix.os == 'ubuntu-latest'}} | ||
| run: 'npm run lint' | ||
|
|
||
| - name: 'npm test' | ||
| run: npm run test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| node_modules/ | ||
| runner/ | ||
|
|
||
| # Rest of the file pulled from https://github.com/github/gitignore/blob/main/Node.gitignore | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
|
|
||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
| *.lcov | ||
|
|
||
| # TypeScript v1 declaration files | ||
| typings/ | ||
|
|
||
| # TypeScript cache | ||
| *.tsbuildinfo | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright 2022 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| module.exports = { | ||
FrodoTheTrue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| arrowParens: 'always', | ||
| bracketSpacing: true, | ||
| endOfLine: 'auto', | ||
| jsxSingleQuote: true, | ||
| printWidth: 100, | ||
| quoteProps: 'consistent', | ||
| semi: true, | ||
| singleQuote: true, | ||
| tabWidth: 2, | ||
| trailingComma: 'all', | ||
| useTabs: false, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @google-github-actions/maintainers |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.