Skip to content

Commit

Permalink
Add support for security.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-linaro committed Feb 23, 2024
1 parent 5afd7b0 commit 9873e3d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ jobs:
- name: Initialise environment
run: cat "$GITHUB_WORKSPACE/website/.github-env-${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: set branch env
run: echo "BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- name: security.txt
# If running on main branch, add signed security.txt file to repo before building
if: env.BRANCH == 'main'
run: |
cd "$GITHUB_WORKSPACE/website"
/srv/github-action-scripts/sign-security.sh
if [ -f "security.txt.asc" ]; then
mkdir "public/.well-known"
mv security.txt.asc "public/.well-known/security.txt"
else
echo "No security.txt.asc produced"
fi
- name: Build site
run: cd ${{ github.workspace }}/website && /srv/github-action-scripts/build-astro-site.sh

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

public/.well-known
2 changes: 2 additions & 0 deletions security.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contact: mailto:psirt@linaro.org
Canonical: https://www.lavasoftare.org/.well-known/security.txt

0 comments on commit 9873e3d

Please sign in to comment.