Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/backup-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
schedule:
- cron: 0 6 * * *

# backup.yml only needs the automatic token (referenced as `github.token`, so no
# secrets have to be passed); AWS access comes from the runner's instance profile.
permissions:
contents: read

jobs:
s3-backup-daily:
# Local ref: always runs the version of backup.yml from this repo's own commit,
# so it is inherently pinned. Other repos must pin to a full commit SHA instead.
uses: ./.github/workflows/backup.yml
secrets: inherit
10 changes: 9 additions & 1 deletion .github/workflows/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ env:
# `sbt assembly` to fail due to e.g. shapeless having special characters like `λ` in class names.
# See https://app.shortcut.com/narrativeio/story/19136
LC_ALL: en_US.UTF-8
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# `github.token` rather than `secrets.GITHUB_TOKEN`: the context form resolves in a
# called workflow without the caller passing anything, so callers do not need
# `secrets: inherit` (see secrets-inherit remediation in backup-daily.yml).
GITHUB_TOKEN: ${{ github.token }}
AWS_REGION: us-east-1

jobs:
s3-backup:
runs-on: self-hosted
steps:
# persist-credentials: false is load-bearing here, not just lint compliance: the
# s3-backup step below mirrors the whole workspace (including .git/) to S3, so a
# persisted token would be written into .git/config in the backup bucket.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Configure AWS credentials
id: configure-aws-credentials
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write
permissions: {}

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write # release-please pushes the release branch and creates tags/releases.
pull-requests: write # release-please opens and updates the release PR.
steps:
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

permissions: {}

jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
contents: read # Only needed for private repos. Needed to clone the repo.
actions: read # Only needed for private repos. Needed for upload-sarif to read workflow run info.
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1