Skip to content

Commit 5728686

Browse files
authored
Merge pull request #35 from elbeno/update-workflow-perms
👷 Use github workflow actions by hash
2 parents 001406c + d9142e8 commit 5728686

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/asciidoctor-ghpages.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Publish GitHub Pages
2+
permissions: read-all
23

34
on:
45
workflow_dispatch:
@@ -32,7 +33,15 @@ jobs:
3233
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
3334
steps:
3435
- name: Checkout source
35-
uses: actions/checkout@v4
36+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
37+
- name: Setup Node.js
38+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
39+
with:
40+
node-version: 18
41+
- name: Install Mermaid
42+
run: |
43+
sudo npm install -g @mermaid-js/mermaid-cli@10.6.1
44+
node /usr/local/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/install.js
3645
- name: Install asciidoctor
3746
run: |
3847
sudo apt update
@@ -45,12 +54,11 @@ jobs:
4554
if [ -e docs/static ]; then cp -rf docs/static ./generated-html; fi
4655
touch ./generated-html/.nojekyll
4756
ls -la ./generated-html
48-
cat ./generated-html/index.html
4957
- name: Setup github pages
5058
if: needs.configure.outputs.enable_publish == 'true'
51-
uses: actions/configure-pages@v4
59+
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
5260
- name: Upload artifacts
53-
uses: actions/upload-pages-artifact@v3
61+
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0
5462
with:
5563
path: ./generated-html
5664

@@ -69,4 +77,4 @@ jobs:
6977
steps:
7078
- name: Deploy to github pages
7179
id: deployment
72-
uses: actions/deploy-pages@v4
80+
uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 # v4.0.3

.github/workflows/unit_tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Unit Tests
2+
permissions: read-all
23

34
on:
45
workflow_dispatch:
@@ -105,7 +106,7 @@ jobs:
105106
stdlib: libc++
106107

107108
steps:
108-
- uses: actions/checkout@v4
109+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
109110

110111
- name: Install build tools
111112
run: |
@@ -128,7 +129,7 @@ jobs:
128129
quality_checks_pass:
129130
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
130131
steps:
131-
- uses: actions/checkout@v4
132+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
132133

133134
- name: Install build tools
134135
run: |
@@ -157,7 +158,7 @@ jobs:
157158
sanitizer: [undefined, address, thread]
158159

159160
steps:
160-
- uses: actions/checkout@v4
161+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
161162

162163
- name: Install build tools
163164
run: |
@@ -177,7 +178,7 @@ jobs:
177178
valgrind:
178179
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
179180
steps:
180-
- uses: actions/checkout@v4
181+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
181182

182183
- name: Install build tools
183184
run: sudo apt update && sudo apt install -y gcc-12 ninja-build valgrind

0 commit comments

Comments
 (0)