Skip to content

Allow github actions to commit to the branch #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2024
Merged
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
15 changes: 11 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
schedule:
- cron: '0 7 * * 1' # 8AM CET/11PM PT on Mondays

# Allow github actions to commit to the branch
permissions:
contents: write

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -34,17 +37,18 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
id: cache
name: Cache ~/.stack
with:
path: ~/.stack
Expand All @@ -54,7 +58,10 @@ jobs:
- name: Build dependencies
run: stack build --system-ghc --only-dependencies

- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
# We shouldn't ever run into an exact key hit (in theory),
# but this prevents errors if we do.
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
Expand Down