### Install Playwright Browsers with Caching (GitHub Actions) Source: https://context7.com/kryota-dev/actions/llms.txt Installs Playwright browsers, leveraging intelligent caching based on the Playwright version. This action requires 'pnpm-setup' or an equivalent Node.js/pnpm setup to be completed beforehand. It's typically used within a GitHub Actions workflow to prepare the environment for Playwright end-to-end tests. ```yaml name: E2E Tests on: [push, pull_request] jobs: e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Setup Node.js/pnpm first - uses: kryota-dev/actions/.github/actions/pnpm-setup@v1 # Install Playwright browsers (cached by version) - uses: kryota-dev/actions/.github/actions/playwright-setup@v1 # Run E2E tests - run: pnpm exec playwright test - uses: actions/upload-artifact@v4 if: failure() with: name: playwright-report path: playwright-report/ ``` -------------------------------- ### Set up Node.js and pnpm Environment (YAML) Source: https://context7.com/kryota-dev/actions/llms.txt Configures a Node.js environment with the pnpm package manager. It automatically sets up pnpm store caching and installs project dependencies, reading Node.js and pnpm versions from project configuration files. ```yaml # .github/workflows/build.yml name: Build on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: kryota-dev/actions/.github/actions/pnpm-setup@v1 # pnpm is now available, dependencies installed - run: pnpm build - run: pnpm test ``` -------------------------------- ### Execute End-to-End Tests with Playwright Source: https://context7.com/kryota-dev/actions/llms.txt This job runs end-to-end tests using Playwright. It depends on the 'build' job and requires checkout, PNPM setup, and Playwright setup. The tests are executed using the 'pnpm exec playwright test' command. ```yaml e2e: runs-on: ubuntu-latest needs: [build] steps: - uses: actions/checkout@v4 - uses: kryota-dev/actions/.github/actions/pnpm-setup@v1 - uses: kryota-dev/actions/.github/actions/playwright-setup@v1 - run: pnpm exec playwright test ``` -------------------------------- ### Send Slack Failure Notification (GitHub Actions) Source: https://context7.com/kryota-dev/actions/llms.txt Posts a failure notification to Slack using an Incoming Webhook URL. This method simplifies setup as the target channel is configured within the webhook itself. It allows for customizable messages, colors, and user mentions, and is conditionally triggered only when a workflow step fails. Requires the Slack Incoming Webhook URL as input. ```yaml # .github/workflows/ci.yml name: CI on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: kryota-dev/actions/.github/actions/pnpm-setup@v1 - run: pnpm test # Notify on failure - uses: kryota-dev/actions/.github/actions/slack-notify-failure@v1 if: failure() with: webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} # Custom failure notification with mention - uses: kryota-dev/actions/.github/actions/slack-notify-failure@v1 if: failure() with: webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} color: '#dc3545' mention-user: '<@U01234567>' title: 'CI pipeline failed' message: 'Tests failed on branch ${{ github.ref_name }}' ``` -------------------------------- ### Build and Test Application with PNPM Source: https://context7.com/kryota-dev/actions/llms.txt This job builds and tests the application using PNPM. It depends on the 'lint' job and runs on an Ubuntu environment. It checks out the code, sets up PNPM, and executes build and test commands. ```yaml build: runs-on: ubuntu-latest needs: [lint] steps: - uses: actions/checkout@v4 - uses: kryota-dev/actions/.github/actions/pnpm-setup@v1 - run: pnpm build - run: pnpm test ``` -------------------------------- ### Perform Security Scanning with CodeQL Source: https://context7.com/kryota-dev/actions/llms.txt This job initiates a CodeQL security scan. It requires specific permissions for actions, contents, and security events. The languages to be scanned are specified as a JSON string. ```yaml security: permissions: actions: read contents: read security-events: write uses: kryota-dev/actions/.github/workflows/codeql-analysis.yml@v1 with: languages: '["javascript"]' ``` -------------------------------- ### Perform CodeQL Security Vulnerability Scanning (YAML) Source: https://context7.com/kryota-dev/actions/llms.txt Runs CodeQL static analysis to detect security vulnerabilities in the codebase. Supports scanning multiple languages, including JavaScript, TypeScript, Python, and Go, and integrates with GitHub Security Alerts. ```yaml # .github/workflows/security.yml name: Security on: pull_request: branches: [main] push: branches: [main] jobs: # Default: scan GitHub Actions (YAML) codeql: permissions: actions: read contents: read security-events: write uses: kryota-dev/actions/.github/workflows/codeql-analysis.yml@v1 # Scan JavaScript/TypeScript codeql-js: permissions: actions: read contents: read security-events: write uses: kryota-dev/actions/.github/workflows/codeql-analysis.yml@v1 with: languages: '["javascript", "typescript"]' # Scan multiple languages codeql-multi: permissions: actions: read contents: read security-events: write uses: kryota-dev/actions/.github/workflows/codeql-analysis.yml@v1 with: languages: '["javascript", "python", "go"]' ``` -------------------------------- ### Run GitHub Actions Linting and Security Checks (YAML) Source: https://context7.com/kryota-dev/actions/llms.txt Executes comprehensive static analysis on GitHub Actions workflows using tools like actionlint, ls-lint, ghalint, and zizmor. It integrates with reviewdog for PR comments and supports custom parameters for tool versions and reporters. ```yaml # .github/workflows/ci.yml name: CI on: pull_request: branches: [main] jobs: lint: permissions: contents: read pull-requests: write uses: kryota-dev/actions/.github/workflows/actions-lint.yml@v1 # With custom parameters lint-custom: permissions: contents: read pull-requests: write uses: kryota-dev/actions/.github/workflows/actions-lint.yml@v1 with: aqua-version: "v2.60.0" reviewdog-reporter: "github-check" ``` -------------------------------- ### Automate Release Tagging and PR Source: https://context7.com/kryota-dev/actions/llms.txt This job handles the release process by tagging a Pull Request and creating a release. It only runs on the 'main' branch and depends on 'build', 'e2e', and 'security' jobs. It requires write permissions for contents and pull requests, and uses a reusable workflow with a secret for authentication. ```yaml release: if: github.ref == 'refs/heads/main' needs: [build, e2e, security] permissions: contents: write pull-requests: write uses: kryota-dev/actions/.github/workflows/tagpr-release.yml@v1 secrets: app-token: ${{ secrets.APP_TOKEN }} ``` -------------------------------- ### Manage Automated Releases with tagpr (YAML) Source: https://context7.com/kryota-dev/actions/llms.txt Automates release management using tagpr, creating release PRs based on CHANGELOG.md updates and semantic version tags upon merge. It also maintains major version tags (e.g., v1) pointing to the latest patch release. ```yaml # .github/workflows/release.yml name: Release on: push: branches: [main] jobs: release: permissions: contents: write pull-requests: write uses: kryota-dev/actions/.github/workflows/tagpr-release.yml@v1 secrets: app-token: ${{ secrets.APP_TOKEN }} # Use output tag for subsequent jobs release-and-notify: permissions: contents: write pull-requests: write uses: kryota-dev/actions/.github/workflows/tagpr-release.yml@v1 secrets: app-token: ${{ secrets.APP_TOKEN }} # Access outputs.tag in dependent jobs ``` -------------------------------- ### Run Linting for Workflows Source: https://context7.com/kryota-dev/actions/llms.txt This job uses a reusable workflow to lint all GitHub Actions workflows within the repository. It requires read and write permissions for contents and pull requests. ```yaml lint: permissions: contents: read pull-requests: write uses: kryota-dev/actions/.github/workflows/actions-lint.yml@v1 ``` -------------------------------- ### Automate Pull Request Assignee Assignment (YAML) Source: https://context7.com/kryota-dev/actions/llms.txt Automatically assigns the pull request creator as the assignee when a PR is opened. It can also assign specific users for bot-generated PRs (e.g., Dependabot, Renovate) or skip assignment. ```yaml # .github/workflows/pr-setup.yml name: PR Setup on: pull_request: types: [opened] jobs: # Basic usage - skips bot PRs auto-assign: permissions: pull-requests: write uses: kryota-dev/actions/.github/workflows/auto-assign-pr.yml@v1 # Assign specific users for bot PRs (e.g., Renovate, Dependabot) auto-assign-with-bot: permissions: pull-requests: write uses: kryota-dev/actions/.github/workflows/auto-assign-pr.yml@v1 with: bot-assignees: 'maintainer1, maintainer2' ``` -------------------------------- ### Send Slack Success Notification (GitHub Actions) Source: https://context7.com/kryota-dev/actions/llms.txt Posts a success notification to Slack using a Bot OAuth Token and the chat.postMessage API. This action supports sending messages to specific channels, including replies within threads, and can be configured with custom messages, colors, and user mentions. It requires Slack channel ID and Bot OAuth Token as inputs. ```yaml # .github/workflows/deploy.yml name: Deploy on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Deploy application run: ./deploy.sh # Basic success notification - uses: kryota-dev/actions/.github/actions/slack-notify-success@v1 with: channel-id: ${{ vars.SLACK_CHANNEL_ID }} bot-oauth-token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} # Custom notification with mention and thread reply - uses: kryota-dev/actions/.github/actions/slack-notify-success@v1 with: channel-id: ${{ vars.SLACK_CHANNEL_ID }} bot-oauth-token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} color: '#36a64f' mention-user: '<@U01234567>' title: 'Production deployment completed' message: 'Version ${{ github.sha }} deployed successfully' thread-ts: ${{ steps.initial-post.outputs.ts }} reply-broadcast: 'true' ``` -------------------------------- ### Notify Slack on Pipeline Failure Source: https://context7.com/kryota-dev/actions/llms.txt This job sends a Slack notification when any part of the pipeline fails. It depends on the initial stages of the pipeline ('lint', 'build', 'e2e', 'security') and uses a composite action to send the notification, requiring a webhook URL and optionally mentioning a user. ```yaml notify-failure: if: failure() needs: [lint, build, e2e, security] runs-on: ubuntu-latest steps: - uses: kryota-dev/actions/.github/actions/slack-notify-failure@v1 with: webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} mention-user: '<@U01234567>' ``` -------------------------------- ### Notify Slack on Release Success Source: https://context7.com/kryota-dev/actions/llms.txt This job sends a Slack notification upon successful completion of the release process on the 'main' branch. It depends on the 'release' job and uses a composite action to send the notification, requiring channel ID and bot token. ```yaml notify-success: if: github.ref == 'refs/heads/main' && success() needs: [release] runs-on: ubuntu-latest steps: - uses: kryota-dev/actions/.github/actions/slack-notify-success@v1 with: channel-id: ${{ vars.SLACK_CHANNEL_ID }} bot-oauth-token: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }} title: 'Release completed' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.