mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-10 13:18:25 +00:00
Bumps the github-actions group with 4 updates in the / directory: [pnpm/action-setup](https://github.com/pnpm/action-setup), [actions/setup-node](https://github.com/actions/setup-node), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `pnpm/action-setup` from 6.0.10 to 6.1.0 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v6.0.10...ea17c68df8912ef543352723c149a84f56e3d413) Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: pnpm/action-setup dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
104 lines
3.5 KiB
YAML
104 lines
3.5 KiB
YAML
name: PR title
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- edited
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: pr-title-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
generate-pr-title:
|
|
name: Generate PR Title
|
|
# Skip when a maintainer has opted out by adding the "Keep PR title" label,
|
|
# and on manual edits so they are not reverted straight away.
|
|
if: github.repository == 'lucide-icons/lucide' &&
|
|
github.event.action != 'edited' &&
|
|
!contains(github.event.pull_request.labels.*.name, 'Keep PR title')
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write # Required to edit the PR title
|
|
|
|
steps:
|
|
# We check out the main branch of the main repository for security reasons.
|
|
# The script only reads its input from the environment, so it never runs
|
|
# any code from the (untrusted) pull request.
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: lucide-icons/lucide
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
|
with:
|
|
# The checkout is the base branch, so the PR head commit isn't available locally.
|
|
use_rest_api: true
|
|
|
|
- name: Generate PR title
|
|
id: generate
|
|
run: |
|
|
NEW_TITLE="$(node ./scripts/generatePullRequestTitle.mts)"
|
|
{
|
|
echo "new_title<<PR_TITLE_EOF"
|
|
echo "$NEW_TITLE"
|
|
echo "PR_TITLE_EOF"
|
|
} >> "$GITHUB_OUTPUT"
|
|
env:
|
|
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
|
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
|
CURRENT_TITLE: ${{ github.event.pull_request.title }}
|
|
|
|
- name: Update PR title
|
|
if: steps.generate.outputs.new_title != ''
|
|
run: gh pr edit "$PR_NUMBER" --title "$NEW_TITLE"
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
NEW_TITLE: ${{ steps.generate.outputs.new_title }}
|
|
|
|
# Runs after the title is generated: an edit made with `GITHUB_TOKEN` does not
|
|
# trigger new workflow runs, so a separate workflow would lint the old title.
|
|
# The lint action fetches the current title through the API.
|
|
lint-pr-title:
|
|
name: PR Title Lint
|
|
needs: generate-pr-title
|
|
if: ${{ !cancelled() }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read # Required to read the PR title
|
|
|
|
steps:
|
|
# Checks out the base branch, so the allowed types can't be changed by the PR.
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Read conventional commit types
|
|
id: commit-types
|
|
run: |
|
|
{
|
|
echo "types<<TYPES_EOF"
|
|
jq -r '.[]' .github/conventional-commit-types.json
|
|
echo "TYPES_EOF"
|
|
} >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
types: ${{ steps.commit-types.outputs.types }}
|
|
requireScope: true
|
|
ignoreLabels: |
|
|
bot
|