Skip to content
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

update #1

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b9a7539
Add sha parameter
louy Nov 2, 2020
765b6c4
Add sha parameter to action.yml
louy Nov 2, 2020
da6fabb
Update README.md
louy Nov 2, 2020
f13caf0
Remove node modules from git
louy Nov 2, 2020
2d1035f
Update to actions toolkit v4
louy Nov 2, 2020
e813c8b
Run tsc build
louy Nov 2, 2020
ee0e7b8
Merge branch 'update-github-actions-toolkit' into patch-1
louy Nov 2, 2020
f9a0141
Run tsc build
louy Nov 2, 2020
82026ae
adding auto inactive
Baikang-Serai Mar 15, 2022
72afe37
Add missing environment action input
aarontwf Apr 22, 2020
c39b246
Remove node modules from git
louy Nov 2, 2020
d2e2e70
Update to actions toolkit v4
louy Nov 2, 2020
904bc9d
Run tsc build
louy Nov 2, 2020
041b3de
update deps
chrnorm May 21, 2022
012cbf9
Merge branch 'patch-1' of https://github.com/louy/deployment-action i…
chrnorm May 21, 2022
e2d9c10
Merge branch 'louy-patch-1'
chrnorm May 21, 2022
2d999fd
update action inputs
chrnorm May 21, 2022
8d96135
update CI workflows
chrnorm May 21, 2022
5840426
update build toolchain
chrnorm May 21, 2022
c005080
CI: fix test workflow
chrnorm May 21, 2022
9781a69
fix task being empty string
chrnorm May 21, 2022
0d885fa
fix default 'task' value
chrnorm May 21, 2022
14e870b
update dist
chrnorm May 21, 2022
e677ff9
Add the target URL as an output (#47)
ansman May 21, 2022
acb754e
use kebab-case for inputs/outputs (#54)
chrnorm May 21, 2022
85dcfb1
update docs with kebab-case inputs
chrnorm May 21, 2022
87db592
Merge branch 'master' of https://github.com/Baikang-Serai/deployment-…
chrnorm May 21, 2022
58247a7
Merge branch 'Baikang-Serai-master'
chrnorm May 21, 2022
ddb3781
Add description to initial deploy status
ogizanagi Nov 6, 2020
1599292
add repo and owner inputs (#55)
chrnorm May 21, 2022
ffbdc62
update readme
chrnorm May 21, 2022
fb58a6a
add github base URL input
chrnorm May 21, 2022
7c1b545
default to GITHUB_HEAD_REF if it's set
chrnorm May 21, 2022
e20e393
improve error message
chrnorm May 21, 2022
62d0db2
docs: update versions to v2
chrnorm May 21, 2022
b751c99
docs: update version in usage
chrnorm May 21, 2022
a1f17f3
reorder readme sections
chrnorm May 21, 2022
1628139
revert to using _ for outputs rather than -
chrnorm May 21, 2022
67f9fd6
document required permissions
chrnorm May 21, 2022
880668c
add environment_url output variable
chrnorm May 21, 2022
3afecce
fix default behaviour for production-environment
chrnorm May 27, 2022
81b5fe7
Use the same owner & repo for updating the deployment status
Aug 18, 2022
d7c4d8f
fix deprecated set-output warnings
piotrekkr Oct 25, 2022
ac65709
rebuild dist
chrnorm Nov 9, 2022
6e62572
update readme
chrnorm Nov 9, 2022
3e77aff
update node 20
j-catania Feb 1, 2024
04d8507
Some dependencies update
maks-oleksyuk Feb 5, 2024
51e9398
Fix dist files CI
maks-oleksyuk Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
lib/
node_modules/
jest.config.js
61 changes: 61 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{"accessibility": "no-public"}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{"allowExpressions": true}
],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
52 changes: 52 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: |
npm run build
npm run package
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
25 changes: 0 additions & 25 deletions .github/workflows/checkin.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '31 7 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['TypeScript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: src
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
npm install
- run: |
npm run all
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
token: '${{ github.token }}'
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
}
Loading