Skip to content

Commit c67c709

Browse files
committed
add build and deploy workflow and openssf scorecard
1 parent 28ae96b commit c67c709

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deployment to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main # <-- specify the branch you want to deploy from
8+
pull_request:
9+
10+
permissions: read-all
11+
12+
env:
13+
REPO_NAME: ${{ github.event.repository.name }}
14+
REPO_OWNER: ${{ github.repository_owner }}
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 60
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
30+
31+
- name: Setup Hugo
32+
uses: peaceiris/actions-hugo@v3
33+
with:
34+
hugo-version: '0.125.5'
35+
extended: true
36+
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: '20'
41+
cache: 'npm'
42+
cache-dependency-path: '**/package-lock.json'
43+
44+
- run: npm ci
45+
- run: hugo --baseURL https://IntelPython.github.io/portable-data-parallel-extensions-europython-2025 --minify
46+
47+
- name: Deploy
48+
uses: peaceiris/actions-gh-pages@v4
49+
if: ${{ github.ref == 'refs/heads/main' }} # <-- specify same branch as above here
50+
with:
51+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '28 2 * * 1'
14+
- cron: '28 2 * * 4'
15+
push:
16+
branches: [ "master" ]
17+
workflow_dispatch:
18+
19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
22+
jobs:
23+
analysis:
24+
name: Scorecard analysis
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 30
27+
permissions:
28+
# Needed to upload the results to code-scanning dashboard.
29+
security-events: write
30+
# Needed to publish results and get a badge (see publish_results below).
31+
id-token: write
32+
# Uncomment the permissions below if installing in a private repository.
33+
# contents: read
34+
# actions: read
35+
36+
steps:
37+
- name: "Checkout code"
38+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
with:
40+
persist-credentials: false
41+
42+
- name: "Run analysis"
43+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
44+
with:
45+
results_file: results.sarif
46+
results_format: sarif
47+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
48+
# - you want to enable the Branch-Protection check on a *public* repository, or
49+
# - you are installing Scorecard on a *private* repository
50+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
51+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
52+
53+
# Public repositories:
54+
# - Publish results to OpenSSF REST API for easy access by consumers
55+
# - Allows the repository to include the Scorecard badge.
56+
# - See https://github.com/ossf/scorecard-action#publishing-results.
57+
# For private repositories:
58+
# - `publish_results` will always be set to `false`, regardless
59+
# of the value entered here.
60+
publish_results: true
61+
62+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
63+
# format to the repository Actions tab.
64+
- name: "Upload artifact"
65+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
66+
with:
67+
name: SARIF file
68+
path: results.sarif
69+
retention-days: 14
70+
71+
# Upload the results to GitHub's code scanning dashboard.
72+
- name: "Upload to code-scanning"
73+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
74+
with:
75+
sarif_file: results.sarif

0 commit comments

Comments
 (0)