Skip to content

Commit cfbcfad

Browse files
authored
Re-enable the Actions workflow linter using the latest version (github#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
1 parent 6e0c231 commit cfbcfad

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = [
1313
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
1414
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
1515
'crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c',
16-
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
16+
'cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be',
1717
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1818
'docker://chinthakagodawita/autoupdate-action:v1',
1919
'fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289',

.github/workflows/remove-unused-assets.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Remove unused assets
22

3-
env:
4-
FREEZE: ${{ secrets.FREEZE }}
5-
63
on:
74
schedule:
85
- cron: '20 15 * * 0' # run every Sunday at 20:15 UTC / 12:15 PST
96

7+
env:
8+
FREEZE: ${{ secrets.FREEZE }}
9+
1010
jobs:
1111
remove_unused_assets:
1212
name: Remove unused assets

.github/workflows/repo-freeze-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
check-freezer:
19-
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
19+
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
2020
name: Prevent merging during deployment freezes
2121
runs-on: ubuntu-latest
2222
steps:

.github/workflows/repo-sync-stalls.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: Repo Sync Stalls
2+
23
on:
34
workflow_dispatch:
45
schedule:
56
- cron: '0 */2 * * *'
7+
8+
env:
9+
FREEZE: ${{ secrets.FREEZE }}
10+
611
jobs:
712
check-freezer:
813
name: Check for deployment freezes
@@ -13,6 +18,7 @@ jobs:
1318
run: |
1419
echo 'The repo is currently frozen! Exiting this workflow.'
1520
exit 1 # prevents further steps from running
21+
1622
repo-sync-stalls:
1723
runs-on: ubuntu-latest
1824
steps:

.github/workflows/update-graphql-files.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
name: Update GraphQL files
22

3-
# **IMPORTANT:** Do not change the FREEZE environment variable set here.
4-
# This workflow runs every hour. To temporarily disable it (for example, during
5-
# a docs freeze), add a secret to the docs repo settings called `FREEZE`
6-
# with a value of `true`. To reenable GraphQL updates, delete the secret in
7-
# the repo settings. The env variable here will evaluate whether the secret exists.
8-
env:
9-
FREEZE: ${{ secrets.FREEZE }}
10-
113
on:
124
workflow_dispatch:
135
schedule:
146
- cron: '20 16 * * *' # run every day at 16:20 UTC / 8:20 PST
157

8+
# **IMPORTANT:** Do not change the FREEZE environment variable set here!
9+
# This workflow runs on a recurring basis. To temporarily disable it (e.g.,
10+
# during a docs deployment freeze), add an Actions Secret to the repo settings
11+
# called `FREEZE` with a value of `true`. To re-enable GraphQL updates, simply
12+
# delete that Secret from the repo settings. The environment variable here
13+
# will duplicate that Secret's value for later evaluation.
14+
env:
15+
FREEZE: ${{ secrets.FREEZE }}
16+
1617
jobs:
1718
update_graphql_files:
1819
if: github.repository == 'github/docs-internal'

.github/workflows/workflow-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Lint workflows
22

33
on:
44
workflow_dispatch:
5-
# push:
6-
# branches:
7-
# - main
8-
# pull_request:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
99

1010
jobs:
1111
lint:
@@ -16,6 +16,6 @@ jobs:
1616
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
1717

1818
- name: Run linter
19-
uses: cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576
19+
uses: cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be
2020
with:
2121
workflows: '[".github/workflows/*.yml"]'

0 commit comments

Comments
 (0)