1
0
mirror of synced 2026-01-07 09:01:31 -05:00

Re-enable the Actions workflow linter using the latest version (#17399)

* Re-enable the Actions workflow linter using the latest version

* Update to the latest actions-linter

* Update to the latest actions-linter

* Rely on secrets.FREEZE directly rather than setting a duplicate env var

* Fix workflow error by using secrets.FREEZE directly as this one doesn't actually set a duplicate env var in the first place!

* Update to latest actions-linter

* Use ${{}} expression syntax

* Readd env.FREEZE to necessary workflows since secrets cannot be checked in 'if' conditions

* Readd the comment to the GraphQL updating workflow about the FREEZE secret

* Upgrade actions-linter
This commit is contained in:
James M. Greene
2021-02-11 09:50:37 -06:00
committed by GitHub
parent 6e0c2319b4
commit cfbcfad1f2
6 changed files with 25 additions and 18 deletions

View File

@@ -1,12 +1,12 @@
name: Remove unused assets
env:
FREEZE: ${{ secrets.FREEZE }}
on:
schedule:
- cron: '20 15 * * 0' # run every Sunday at 20:15 UTC / 12:15 PST
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
remove_unused_assets:
name: Remove unused assets

View File

@@ -16,7 +16,7 @@ env:
jobs:
check-freezer:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
name: Prevent merging during deployment freezes
runs-on: ubuntu-latest
steps:

View File

@@ -1,8 +1,13 @@
name: Repo Sync Stalls
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
check-freezer:
name: Check for deployment freezes
@@ -13,6 +18,7 @@ jobs:
run: |
echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running
repo-sync-stalls:
runs-on: ubuntu-latest
steps:

View File

@@ -1,18 +1,19 @@
name: Update GraphQL files
# **IMPORTANT:** Do not change the FREEZE environment variable set here.
# This workflow runs every hour. To temporarily disable it (for example, during
# a docs freeze), add a secret to the docs repo settings called `FREEZE`
# with a value of `true`. To reenable GraphQL updates, delete the secret in
# the repo settings. The env variable here will evaluate whether the secret exists.
env:
FREEZE: ${{ secrets.FREEZE }}
on:
workflow_dispatch:
schedule:
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
# **IMPORTANT:** Do not change the FREEZE environment variable set here!
# This workflow runs on a recurring basis. To temporarily disable it (e.g.,
# during a docs deployment freeze), add an Actions Secret to the repo settings
# called `FREEZE` with a value of `true`. To re-enable GraphQL updates, simply
# delete that Secret from the repo settings. The environment variable here
# will duplicate that Secret's value for later evaluation.
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
update_graphql_files:
if: github.repository == 'github/docs-internal'

View File

@@ -2,10 +2,10 @@ name: Lint workflows
on:
workflow_dispatch:
# push:
# branches:
# - main
# pull_request:
push:
branches:
- main
pull_request:
jobs:
lint:
@@ -16,6 +16,6 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Run linter
uses: cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576
uses: cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be
with:
workflows: '[".github/workflows/*.yml"]'