Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
ignore:
- dependency-name: "yiisoft/*"
16 changes: 11 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@

permissions:
contents: read
checks: write

jobs:
build:

Check notice on line 13 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

anonymous-definition

docs.yml:13: workflow or action definition without a name: this job
permissions:
checks: write

Check warning on line 15 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

undocumented-permissions

docs.yml:15: permissions without explanatory comments: needs an explanatory comment
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

Check warning on line 21 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

ref-version-mismatch

docs.yml:21: action's hash pin has mismatched or missing version comment: missing version comment
with:
persist-credentials: false

- name: Fetch styles
run: |
Expand All @@ -24,7 +29,7 @@
unzip Microsoft.zip -d .github/styles

- name: Check
uses: errata-ai/vale-action@reviewdog
uses: errata-ai/vale-action@85f9f7f2c5f449ac0ae5b66662961bae3f77ca6a

Check warning on line 32 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

ref-version-mismatch

docs.yml:32: action's hash pin has mismatched or missing version comment: missing version comment
with:
reporter: github-check
fail_on_error: false
Expand All @@ -33,24 +38,25 @@
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

links:

Check notice on line 41 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

anonymous-definition

docs.yml:41: workflow or action definition without a name: this job
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10

Check warning on line 45 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

ref-version-mismatch

docs.yml:45: action's hash pin has mismatched or missing version comment: missing version comment
with:
fetch-depth: 0
persist-credentials: false

- name: Find files to check
id: links
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then

Check warning on line 54 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:54: code injection via template expansion: may expand into attacker-controllable code
git diff --name-status --diff-filter=ACMRTD "${{ github.event.pull_request.base.sha }}...HEAD" > changed-files.txt

Check warning on line 55 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:55: code injection via template expansion: may expand into attacker-controllable code
elif [ "${{ github.event.before }}" = "0000000000000000000000000000000000000000" ]; then

Check warning on line 56 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:56: code injection via template expansion: may expand into attacker-controllable code
git diff-tree --root --no-commit-id --name-status -r "${{ github.sha }}" > changed-files.txt

Check warning on line 57 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:57: code injection via template expansion: may expand into attacker-controllable code
else
git diff --name-status --diff-filter=ACMRTD "${{ github.event.before }}..${{ github.sha }}" > changed-files.txt

Check warning on line 59 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:59: code injection via template expansion: may expand into attacker-controllable code

Check warning on line 59 in .github/workflows/docs.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

template-injection

docs.yml:59: code injection via template expansion: may expand into attacker-controllable code
fi

check_all=false
Expand Down Expand Up @@ -82,7 +88,7 @@

- name: Setup Node.js
if: steps.links.outputs.count != '0'
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
cache: npm
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:

Check notice on line 17 in .github/workflows/github-pages.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

anonymous-definition

github-pages.yml:17: workflow or action definition without a name: this job
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
cache: npm
Expand All @@ -35,12 +35,16 @@
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
with:
path: src/.vitepress/dist

deploy:

Check notice on line 42 in .github/workflows/github-pages.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

anonymous-definition

github-pages.yml:42: workflow or action definition without a name: this job
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -49,4 +53,4 @@
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
16 changes: 12 additions & 4 deletions .github/workflows/translate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update translations

on:
pull_request_target:
pull_request:
paths:
- '_translations/**'
push:
Expand All @@ -10,31 +10,39 @@
- '_translations/**'
- 'src/**'

permissions:
contents: write

Check failure on line 14 in .github/workflows/translate.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

excessive-permissions

translate.yml:14: overly broad permissions: contents: write is overly broad at the workflow level
jobs:
update-docs:
name: Update docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN || github.token }}
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false

- name: Prepare po4a configuration
run: _translations/prepare-config.sh

- name: Use po4a
uses: vjik/docker-run@v1
uses: vjik/docker-run@623c9adf6ee99fc8f9fa4e3b0b6b0c25859b69ee
with:
image: ghcr.io/yiisoft-contrib/po4a:0.74
volumes: ${{ github.workspace }}:/src
workdir: /src/_translations
command: po4a po4a.conf && po4a po4a.conf

- name: Configure Git credentials
env:
GH_TOKEN: ${{ secrets.YIISOFT_GITHUB_TOKEN || github.token }}
run: git config --global credential.helper '!f() { echo username=x-access-token; echo password=$GH_TOKEN; }; f'

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403

Check notice on line 45 in .github/workflows/translate.yml

View workflow job for this annotation

GitHub Actions / zizmor / Run zizmor 🌈

superfluous-actions

translate.yml:45: action functionality is already included by the runner: use `git add`, `git commit`, and `git push` in a script step
with:
commit_message: Update translation
file_pattern: '_translations src'
22 changes: 22 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches:
- master
- main
paths:
- '.github/**.yml'
- '.github/**.yaml'
pull_request:
paths:
- '.github/**.yml'
- '.github/**.yaml'

permissions:
actions: read # Required by zizmor when reading workflow metadata through the API.
contents: read # Required to read workflow files.

jobs:
zizmor:
uses: yiisoft/actions/.github/workflows/zizmor.yml@master
Loading