Skip to content

Commit

Permalink
CIで使用しているスクリプトをTypeScript化する
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit committed Nov 17, 2024
1 parent 0b6a284 commit c8ecdc6
Show file tree
Hide file tree
Showing 12 changed files with 18,482 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/** linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
paths:
- .github/workflows/create-release.yml
- scripts/action/**
- dist/**
- action.yml
permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
DEFAULT_BRANCH: main
LINTER_RULES_PATH: .
VALIDATE_JSCPD: false
JAVASCRIPT_DEFAULT_STYLE: prettier
VALIDATE_JAVASCRIPT_STANDARD: false
TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_TYPESCRIPT_STANDARD: false
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
39 changes: 39 additions & 0 deletions .github/workflows/update-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: update-dist
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
update-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
if: github.event_name != 'pull_request' || github.event.action != 'closed'
with:
cache: npm
node-version-file: .node-version
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: bash "${GITHUB_WORKSPACE}/scripts/update_dist/update_dist/build.sh"
- uses: dev-hato/actions-diff-pr-management@e5c78b251a69f44f93b2f1398e06b129bcf151ec # v1.2.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
branch-name-prefix: apply-dist
pr-title-prefix: dist反映
pr-description-prefix: srcの内容をdistに反映します。
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ runs:
with:
github-token: ${{ inputs.github-token }}
script: |
const script = require('${{ github.action_path }}/scripts/action/remove_prs_and_issues.js')
await script({github})
const {script} = require('${{ github.action_path }}/dist/remove_prs_and_issues.js')
await script(github)
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
project-url: ${{ inputs.project-url }}
Expand Down
Loading

0 comments on commit c8ecdc6

Please sign in to comment.