Skip to content

Commit

Permalink
[fix]: change token handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragdata committed Jul 7, 2024
1 parent 93673ff commit cf19a81
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/call-local.mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ jobs:
issues: write
pull-requests: write
uses: ./.github/workflows/mega-linter.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 8 additions & 5 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ on:
required: false
type: string
default: "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
secrets:
token:
required: true

# Comment env block if you do not want to apply fixes
env:
Expand Down Expand Up @@ -89,7 +92,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.token }}
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
# improve performance
# fetch-depth: 0
Expand Down Expand Up @@ -151,7 +154,7 @@ jobs:
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.token }}

# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
Expand Down Expand Up @@ -197,9 +200,9 @@ jobs:
id: cpr
if: env.APPLY_FIXES_IF_PR == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
token: ${{ secrets.token }}
commit-message: ${{ inputs.commit_message }}
title: "[MegaLinter] Apply Linters Automatic Fixes"
labels: bot

########################################################
Expand Down
2 changes: 0 additions & 2 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ ENABLE_LINTERS:
- TYPESCRIPT_STANDARD
- XML_XMLLINT
- YAML_YAMLLINT
DISABLE_ERRORS_LINTERS:
-
# DISABLE: If you use DISABLE variable, the linters in the listed descriptors will be skipped
# DISABLE_LINTERS: # If you use DISABLE_LINTERS variable, the listed linters will be skipped
PRINT_ALL_FILES: false
Expand Down
4 changes: 2 additions & 2 deletions callers/call.mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
issues: write
pull-requests: write
uses: ragdata/reusable-workflows/.github/workflows/mega-linter.yml@master
with:
megalinter_config: https://raw.githubusercontent.com/Ragdata/reusable-workflows/blob/master/.mega-linter.yml
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cf19a81

Please sign in to comment.