mirror of
https://github.com/iptv-org/iptv.git
synced 2026-09-20 10:40:51 -04:00
Pin every action reference to the full commit SHA that its current tag already resolves to, with the version kept in a trailing comment. No action changes version as a result of this commit -- including actions/setup-node in validate_issue.yml, which stays on v4.4.0 rather than being lifted to the v6 used by the other workflows. Version bumps are left to Dependabot so they arrive as reviewable PRs. Add .github/dependabot.yml for the github-actions ecosystem: weekly on Monday, minor/patch grouped into a single PR (majors always get their own), "ci" commit prefix. tibdex/github-app-token is ignored to match iptv-org-database; it is archived upstream, so replacing it should be a considered migration rather than an automated bump.
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Validate Label
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository code
|
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
|
|
|
- uses: tibdex/github-app-token@0d49dd721133f900ebd5e0dff2810704e8defbc6 # v1.8.2
|
|
if: ${{ !env.ACT }}
|
|
id: create-app-token
|
|
with:
|
|
app_id: ${{ secrets.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
|
|
- name: Block self-approval
|
|
if: |
|
|
github.event.label.name == 'approved' &&
|
|
github.actor == github.event.issue.user.login
|
|
env:
|
|
GH_TOKEN: ${{ steps.create-app-token.outputs.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: |
|
|
if [ "${{ env.ACT }}" = "true" ]; then
|
|
echo "[MOCK] Post comment: A request cannot be approved by its author."
|
|
echo "[MOCK] Remove label: approved"
|
|
else
|
|
gh issue comment $ISSUE_NUMBER --body "A request cannot be approved by its author."
|
|
gh issue edit $ISSUE_NUMBER --remove-label "approved"
|
|
fi
|
|
|
|
exit 1
|