Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
paths:
.github/workflows/**/*.{yml,yaml}:
ignore:
- '"inputs" section is alias node but mapping node is expected'
- '"paths" section must be sequence node but got alias node with "" tag'
- '"paths-ignore" section must be sequence node but got alias node with "" tag'
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
45 changes: 45 additions & 0 deletions .github/workflows/.issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Issue"

on:
issues:
types: [opened]

jobs:
issue:
name: "Issue"
if: ${{ !github.event.issue.type || github.event.issue.type.name == 'Bug' }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
issues: write
steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Create App Token"
id: app
uses: actions/create-github-app-token@v3
with:
app-id: 146360
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: "AI Issue"
uses: smashedr/ai-issue-action@master
env:
GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
with:
token: ${{ steps.app.outputs.token }}
model: gemini-2.5-flash
instructions: |
You are a helpful assistant responding to a GitHub Issue created by user @${{ github.actor }}
in the repository ${{ github.server_url }}/${{ github.repository }}
Provide initial triage and troubleshooting steps, then gather any additional information needed to proceed.
Respond using your general knowledge of GitHub Workflows and the following knowledge files:
file: |
README.md
actions-lint.yaml
deploy-static.yaml
npm-build.yaml
tail: |
_Response generated by the [AI Issue Action](https://github.com/smashedr/ai-issue-action)._
30 changes: 11 additions & 19 deletions .github/workflows/.lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,28 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Prettier"
- name: "prettier"
if: ${{ !cancelled() }}
run: |
echo "::group::Install"
npm install prettier
echo "::endgroup::"
npx prettier --check .

- name: "Yamllint"
- name: "yamllint"
if: ${{ !cancelled() }}
env:
CONFIG: .github/yamllint.yaml
run: |
echo "::group::List Files"
yamllint --list-files .
yamllint -c "${{ env.CONFIG }}" --list-files .
echo "::endgroup::"
yamllint .
yamllint -c "${{ env.CONFIG }}" .

- name: "Actionlint"
- name: "actionlint"
if: ${{ !cancelled() }}
run: |
echo "::group::Download"
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
echo "loc: ${loc}"
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
echo "tag: ${tag}"
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
echo "url: ${url}"
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
file "${RUNNER_TEMP}/actionlint"
"${RUNNER_TEMP}/actionlint" --version
echo "::endgroup::"
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=
uses: cssnr/actionlint-action@v1
with:
shellcheck_opts: -e SC2129
16 changes: 3 additions & 13 deletions .github/workflows/deploy-static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ on:
path:
type: string

#concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
deploy:
name: "Deploy"
Expand All @@ -46,14 +42,8 @@ jobs:
url: ${{ inputs.url }}

steps:
- name: "Debug CTX github"
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"

- name: "Download Artifact"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v8
with:
name: ${{ inputs.artifact }}

Expand Down Expand Up @@ -102,8 +92,8 @@ jobs:
SSHPASS: ${{ secrets.pass }}
run: |
sshpass -e rsync -aPvh --delete -e \
'ssh -p ${{ secrets.port }} -o ConnectTimeout=30' \
./ "${{ secrets.user }}"@"${{ secrets.host }}":"${{ inputs.dest }}"
"ssh -p ${{ secrets.port }} -o ConnectTimeout=30" \
./ "${{ secrets.user }}@${{ secrets.host }}:${{ inputs.dest }}"

- name: "Send Discord Notification"
if: ${{ env.webhook }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: "Setup Node"
if: ${{ inputs.node-version != '' }}
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/npm-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ on:
secrets:
webhook:

#concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

jobs:
build:
name: "Build"
Expand All @@ -39,7 +35,7 @@ jobs:
run: echo "$GITHUB_CTX"

- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -71,7 +67,7 @@ jobs:

- name: "Upload Artifact"
if: ${{ !inputs.pages }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand All @@ -80,7 +76,7 @@ jobs:

- name: "Upload Pages Artifact"
if: ${{ inputs.pages }}
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: ${{ inputs.path }}

Expand Down
7 changes: 7 additions & 0 deletions .github/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: relaxed

ignore-from-file: .gitignore

rules:
line-length:
max: 120
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github/disabled
.github/pull_request_template.md
package-lock.json
22 changes: 21 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
{}
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 90,
"overrides": [
{
"files": ["**/*.vue"],
"options": {
"printWidth": 120
}
},
{
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
"options": {
"singleQuote": false,
"printWidth": 120
}
}
]
}
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/cssnr/workflows/.lint.yaml?logo=cachet&label=lint)](https://github.com/cssnr/workflows/actions/workflows/.lint.yaml)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/workflows?logo=vitepress&logoColor=white&label=updated)](https://github.com/cssnr/workflows/pulse)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/workflows?logo=github)](https://github.com/cssnr/workflows/graphs/contributors)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/workflows?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/workflows)
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/workflows?logo=github)](https://github.com/cssnr/workflows/discussions)
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/workflows?style=flat&logo=github)](https://github.com/cssnr/workflows/stargazers)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&label=org%20stars)](https://cssnr.github.io/)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/workflows?logo=listenhub&label=updated)](https://github.com/cssnr/workflows/pulse)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/workflows?logo=buffer&label=repo%20size)](https://github.com/cssnr/workflows?tab=readme-ov-file#readme)
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/workflows?logo=devbox)](https://github.com/cssnr/workflows?tab=readme-ov-file#readme)
[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/workflows?logo=southwestairlines)](https://github.com/cssnr/workflows/graphs/contributors)
[![GitHub Issues](https://img.shields.io/github/issues/cssnr/workflows?logo=codeforces&logoColor=white)](https://github.com/cssnr/workflows/issues)
[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/workflows?logo=theconversation)](https://github.com/cssnr/workflows/discussions)
[![GitHub Forks](https://img.shields.io/github/forks/cssnr/workflows?style=flat&logo=forgejo&logoColor=white)](https://github.com/cssnr/workflows/forks)
[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/workflows?style=flat&logo=gleam&logoColor=white)](https://github.com/cssnr/workflows/stargazers)
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=apachespark&logoColor=white&label=org%20stars)](https://cssnr.github.io/)
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi&label=support)](https://ko-fi.com/cssnr)

Expand All @@ -28,31 +30,31 @@ Example using both workflows: [django-files/django-files.github.io/dev.yaml](htt
```yaml
jobs:
build:
name: "Build"
name: 'Build'
if: ${{ !contains(github.event.head_commit.message, '#nodev') }}
uses: cssnr/workflows/.github/workflows/npm-build.yaml@master
permissions:
contents: read
with:
install: "npm ci" # install command
build: "npm run build" # build command
path: "dist" # directory of artifacts
name: "artifact" # artifact name
install: 'npm ci' # install command
build: 'npm run build' # build command
path: 'dist' # directory of artifacts
name: 'artifact' # artifact name
pages: false # create a pages artifact
secrets:
webhook: ${{ secrets.webhook }} # failure notification

# Example Usage
deploy:
name: "Deploy"
name: 'Deploy'
needs: build
runs-on: ubuntu
steps:
- name: "Download Artifact"
- name: 'Download Artifact'
uses: actions/download-artifact@v5
with:
name: "artifact"
- name: "Debug"
name: 'artifact'
- name: 'Debug'
run: ls -lAh .
```

Expand All @@ -62,25 +64,25 @@ jobs:
jobs:
build:
# Example Usage
- name: "Upload Artifact"
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
path: dist
name: "artifact"
name: 'artifact'

deploy:
name: "Deploy"
name: 'Deploy'
uses: cssnr/workflows/github/workflows/deploy-static.yaml
needs: build
permissions:
contents: read
with:
name: "dev" # Environment name and url
url: "https://dev-static.cssnr.com/github-projects"
path: "github-projects" # Optional path/subdirectory
name: 'dev' # Environment name and url
url: 'https://dev-static.cssnr.com/github-projects'
path: 'github-projects' # Optional path/subdirectory
robots: true # Add robots.txt to block robots
artifact: "artifact" # Custom artifact name
dest: "/static" # Target rsync destination
artifact: 'artifact' # Custom artifact name
dest: '/static' # Target rsync destination
secrets:
host: ${{ secrets.DEV_DEPLOY_HOST }}
port: ${{ secrets.DEV_DEPLOY_PORT }}
Expand Down