Skip to content

Update token to GITHUB_TOKEN #1

Update token to GITHUB_TOKEN

Update token to GITHUB_TOKEN #1

Workflow file for this run

# This workflow automatically applies labels to issues and pull requests
# based on regular expression matches against the content in the issue
# or pull request or file path pattern matches.
#
# The labels are declaratively defined in the following configuration files:
# - File Path Patterns: .sync/workflows/config/label-issues/file-paths.yml
# - Regular Expressions for Pull Requests: .sync/workflows/config/label-issues/regex-pull-requests.yml
#
# These will be mapped to the following directories in repos that use this reusable workflow:
# - File Path Patterns: .github/workflows/label-issues/file-paths.yml
# - Regular Expressions for Pull Requests: .github/workflows/label-issues/regex-pull-requests.yml
#
# Ideally, curl (or wget) could be used to grab the files from mu_devops in this workflow file and once on
# the local runner, the file path could simply be passed to the actions. That is not currently possible as
# the actions are hardcoded to use the GitHub REST API to get the files in the local repo. If that is fixed
# (tracked in https://github.com/github/issue-labeler/issues/39) then that approach can be used.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
#
# For more information, see:
# https://github.com/actions/labeler
# https://github.com/github/issue-labeler
name: Apply Labels Based on Message Content
on:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 30 in .github/workflows/Labeler.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/Labeler.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
description: 'GitHub token for authentication'
required: true
jobs:
sync:
name: Label Based on Messages
runs-on: ubuntu-latest
steps:
- name: Apply Labels Based on PR File Paths
uses: actions/labeler@v4.3.0
with:
configuration-path: .github/workflows/label-issues/file-paths.yml
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
- name: Apply Labels Based on PR Messages
uses: github/issue-labeler@v3.4
with:
configuration-path: .github/workflows/label-issues/regex-pull-requests.yml
enable-versioned-regex: 0
repo-token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'