Merge branch 'esx-framework:main' into production

This commit is contained in:
thefourCraft
2023-07-09 09:54:19 +03:00
committed by GitHub
3 changed files with 92 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
max_line_length = 300
indent_size = 4
indent_style = space
+43
View File
@@ -0,0 +1,43 @@
name: formatter-all
on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
jobs:
formatter:
name: formatter
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'format_all') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install stylua and format files
uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.18.0
args: -- .
- name: Format files with Prettier
run: |
npx prettier --write '**/*.{ts,js,css,html}'
- name: Update repo before push
run: |
git pull
- name: Commit changes and push current branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: ESX GITHUB ACTIONS BOT
commit_user_email: esx-github-actions-bot@users.noreply.github.com
commit_message: :art:Code formatted in all files
+39
View File
@@ -0,0 +1,39 @@
name: Add issue or pull request to project board
on:
issues:
types:
- opened
pull_request:
types:
- opened
jobs:
add-to-project:
name: Add issue or pull request to project
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get event creation date
id: date
run: |
if [[ "${{ github.event_name }}" == "issues" ]]; then
echo "date=${{ github.event.issue.created_at }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "date=${{ github.event.pull_request.created_at }}" >> $GITHUB_ENV
fi
- name: Add to project
uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/esx-framework/projects/9
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
id: add-project
- name: Update project fields
uses: titoportas/update-project-fields@v0.1.0
with:
project-url: https://github.com/orgs/esx-framework/projects/9
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
item-id: ${{ steps.add-project.outputs.itemId }}
field-keys: Date
field-values: ${{ env.date }},