Skip to content

Commit

Permalink
Update workflows environments (#2657)
Browse files Browse the repository at this point in the history
* Update workflows environments

* PAT for dev envs
  • Loading branch information
nvuillam committed May 18, 2023
1 parent 9c87c33 commit 8744f77
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/auto-update-linters.yml
Expand Up @@ -31,6 +31,8 @@ jobs:
contents: write
issues: write
pull-requests: write
environment:
name: auto-update
# Prevent duplicate run from happening when a forked push is committed
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && github.repository == 'oxsecurity/megalinter'
# Set max build time for the job
Expand Down Expand Up @@ -111,7 +113,7 @@ jobs:
if: steps.compute_versions.outputs.has_updated_versions == 1
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
author: "Nicolas Vuillamy <nicolas.vuillamy@gmail.com>"
commit-message: "[automation] Auto-update linters version, help and documentation"
delete-branch: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-BETA-flavors.yml
Expand Up @@ -45,7 +45,7 @@ jobs:
# Set the agent to run on
runs-on: ${{ matrix.os }}
environment:
name: beta-flavors
name: beta
strategy:
fail-fast: false
max-parallel: 10
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-BETA-linters.yml
Expand Up @@ -63,6 +63,8 @@ jobs:
runs-on: ${{ matrix.os }}
permissions:
packages: write
environment:
name: beta
strategy:
fail-fast: false
max-parallel: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-RELEASE-flavors.yml
Expand Up @@ -35,7 +35,7 @@ jobs:
# Set the agent to run on
runs-on: ${{ matrix.os }}
environment:
name: latest-flavors
name: release
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-RELEASE-linters.yml
Expand Up @@ -39,6 +39,8 @@ jobs:
runs-on: ${{ matrix.os }}
permissions:
packages: write
environment:
name: release
strategy:
fail-fast: false
max-parallel: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-RELEASE.yml
Expand Up @@ -38,7 +38,7 @@ jobs:
# Only run on main repo
if: github.repository == 'oxsecurity/megalinter' && !contains(github.event.head_commit.message, 'skip deploy')
environment:
name: latest
name: release
##################
# Load all steps #
##################
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mega-linter-for-runner.yml
Expand Up @@ -30,11 +30,13 @@ jobs:
contents: write
issues: write
pull-requests: write
environment:
name: dev
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0

# MegaLinter
Expand Down Expand Up @@ -67,7 +69,7 @@ jobs:
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mega-linter.yml
Expand Up @@ -30,11 +30,13 @@ jobs:
contents: write
issues: write
pull-requests: write
environment:
name: dev
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0

# MegaLinter
Expand Down Expand Up @@ -67,7 +69,7 @@ jobs:
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot
Expand Down

0 comments on commit 8744f77

Please sign in to comment.