Skip to content

Devops #4328

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Devops #4328

Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[//]: # "Pull Request Template"
[//]: # "Replace the placeholder values in the template below"
[//]: # 'Pull Request Template'
[//]: # 'Replace the placeholder values in the template below'

- **File(s) Modified**: _0001-two-sum.py, 0002-add-two-numbers.py, etc..._
- **Language(s) Used**: _python, javascript, etc..._
- **Submission URL**: _https://leetcode.com/problems/[problem-name]/submissions/xxxxxxxxx/_

[//]: # "Getting the Submission URL"
[//]: # "Go to the leetcode [`Submissions tab`](https://user-images.githubusercontent.com/71089234/180188604-b1ecaf90-bf27-4fd6-a559-5567aebf8930.png)"
[//]: # "and [click on the `Accepted` status of your submission.](https://user-images.githubusercontent.com/71089234/180189321-1a48c33f-aa65-4b29-8aaa-685f4f5f8c9e.png)]"
[//]: # "Finally copy the URL from the nav bar, it should look like https://leetcode.com/problems/[problem-name]/submissions/xxxxxxxxx/"

[//]: # 'Getting the Submission URL'
[//]: # 'Go to the leetcode [`Submissions tab`](https://user-images.githubusercontent.com/71089234/180188604-b1ecaf90-bf27-4fd6-a559-5567aebf8930.png)'
[//]: # 'and [click on the `Accepted` status of your submission.](https://user-images.githubusercontent.com/71089234/180189321-1a48c33f-aa65-4b29-8aaa-685f4f5f8c9e.png)]'
[//]: # 'Finally copy the URL from the nav bar, it should look like https://leetcode.com/problems/[problem-name]/submissions/xxxxxxxxx/'

### Important

Please make sure the file name is lowercase and a duplicate file does not already exist before merging.
72 changes: 37 additions & 35 deletions .github/workflows/build-readme.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
name: Build readme file

on:
#push:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
schedule:
- cron: '0 * * * *' # Every hour

jobs:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 1

- name: Use Node.js (dependency)
uses: actions/setup-node@v3
with:
node-version: 16

- name: Completion Table
run: node updateCompletionTable.js;

- name: Check for modified files
id: git-check
run: echo modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT

- name: Push
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bot-A0"
git add .
git commit -am "📜 Update README table (🛠️ from Github Actions)" || true
git push || git pull --rebase && git push


Build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 1

- name: Use Node.js (dependency)
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Completion Table
run: node updateCompletionTable.js;

- name: Check for modified files
id: git-check
run: echo modified=$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT

- name: Push
if: steps.git-check.outputs.modified == 'true'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bot-A0"
git add .
git commit -am "📜 Update README table (🛠️ from Github Actions)" || true
git push || git pull --rebase && git push
13 changes: 7 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@ name: Format Files
# typescript - prettier

on:
# pull_request_target:
# types: [opened, synchronize]
workflow_dispatch:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
Format:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 1

- name: Use Node.js (dependency)
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down Expand Up @@ -62,4 +63,4 @@ jobs:
git config --global user.name "Bot-A0"
git add .
git commit -m "🎨 Format files (🛠️ from Github Actions)" || true
git push || true
git push || true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
.metals
.vscode
.vscode
.idea
node_modules
Loading