Skip to content

Commit

Permalink
enh(chore): github actions hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed Dec 19, 2023
1 parent d346fe1 commit fe49c15
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 5
labels:
- 'pr: dependencies'
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Check warning on line 19 in .github/workflows/actionlint.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

19:73 [comments] too few spaces before comment

- name: Download actionlint
id: get_actionlint
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Check warning on line 42 in .github/workflows/actionlint.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

42:73 [comments] too few spaces before comment

- name: Install Yaml
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Check warning on line 18 in .github/workflows/archive.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

18:73 [comments] too few spaces before comment

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2

Check warning on line 21 in .github/workflows/archive.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

21:75 [comments] too few spaces before comment
with:
node-version: 20

Expand All @@ -37,7 +37,7 @@ jobs:
run: ARCHIVED_VERSION="${{ github.event.inputs.version }}" yarn build

- name: Store build archived doc in cache
uses: actions/cache/save@v3
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 40 in .github/workflows/archive.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

40:75 [comments] too few spaces before comment
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: [self-hosted, infra]
steps:
- name: Restore built archived doc from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 50 in .github/workflows/archive.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

50:78 [comments] too few spaces before comment
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Check warning on line 29 in .github/workflows/documentation.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

29:73 [comments] too few spaces before comment

- name: Get changes
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1

Check warning on line 32 in .github/workflows/documentation.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

32:75 [comments] too few spaces before comment
id: changes
with:
token: ${{ github.token }}
Expand Down Expand Up @@ -169,10 +169,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Check warning on line 172 in .github/workflows/documentation.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

172:73 [comments] too few spaces before comment

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2

Check warning on line 175 in .github/workflows/documentation.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

175:75 [comments] too few spaces before comment
with:
node-version: 20
cache: yarn
Expand All @@ -191,7 +191,7 @@ jobs:
BASE_URL: ${{ github.event_name == 'pull_request' && format('/previews/pr-{0}/{1}', github.event.pull_request.number, matrix.environment) || '' }}

- name: Store build in cache
uses: actions/cache/save@v3
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
Expand All @@ -210,10 +210,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
Expand Down Expand Up @@ -290,10 +290,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-staging"
Expand Down Expand Up @@ -322,10 +322,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Restore build from cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-next"
Expand Down

0 comments on commit fe49c15

Please sign in to comment.