Skip to content

Commit

Permalink
Use L2D workflows (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmlft authored Aug 7, 2024
1 parent eea80d4 commit 4fb5ec7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 24 deletions.
14 changes: 7 additions & 7 deletions inst/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- name: 'Download PR artifact'
id: dl
uses: carpentries/actions/download-workflow-artifact@main
uses: LearnToDiscover/actions/download-workflow-artifact@l2d
with:
run: ${{ github.event.workflow_run.id }}
name: 'pr'
Expand All @@ -59,7 +59,7 @@ jobs:
- name: "Check PR"
id: check-pr
if: ${{ steps.dl.outputs.success == 'true' }}
uses: carpentries/actions/check-valid-pr@main
uses: LearnToDiscover/actions/check-valid-pr@l2d
with:
pr: ${{ steps.get-pr.outputs.NUM }}
sha: ${{ github.event.workflow_run.head_sha }}
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:

- name: 'Download built markdown'
id: dl
uses: carpentries/actions/download-workflow-artifact@main
uses: LearnToDiscover/actions/download-workflow-artifact@l2d
with:
run: ${{ github.event.workflow_run.id }}
name: 'built'
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
steps:
- name: 'Download comment artifact'
id: dl
uses: carpentries/actions/download-workflow-artifact@main
uses: LearnToDiscover/actions/download-workflow-artifact@l2d
with:
run: ${{ github.event.workflow_run.id }}
name: 'diff'
Expand All @@ -140,7 +140,7 @@ jobs:
- name: "Comment on PR"
id: comment-diff
if: ${{ steps.dl.outputs.success == 'true' }}
uses: carpentries/actions/comment-diff@main
uses: LearnToDiscover/actions/comment-diff@l2d
with:
pr: ${{ env.NR }}
path: ${{ github.workspace }}/diff.md
Expand All @@ -160,7 +160,7 @@ jobs:
steps:
- name: 'Check for spoofing'
id: dl
uses: carpentries/actions/download-workflow-artifact@main
uses: LearnToDiscover/actions/download-workflow-artifact@l2d
with:
run: ${{ github.event.workflow_run.id }}
name: 'built'
Expand All @@ -178,7 +178,7 @@ jobs:
- name: "Comment on PR"
id: comment-diff
uses: carpentries/actions/comment-diff@main
uses: LearnToDiscover/actions/comment-diff@l2d
with:
pr: ${{ env.NR }}
body: ${{ env.body }}
Expand Down
4 changes: 2 additions & 2 deletions inst/workflows/pr-post-remove-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: write
steps:
- name: 'Download artifact'
uses: carpentries/actions/download-workflow-artifact@main
uses: LearnToDiscover/actions/download-workflow-artifact@l2d
with:
run: ${{ github.event.workflow_run.id }}
name: pr
Expand All @@ -27,6 +27,6 @@ jobs:
unzip pr.zip
echo "NUM=$(<./NUM)" >> $GITHUB_OUTPUT
- name: 'Remove branch'
uses: carpentries/actions/remove-branch@main
uses: LearnToDiscover/actions/remove-branch@l2d
with:
pr: ${{ steps.get-pr.outputs.NUM }}
4 changes: 2 additions & 2 deletions inst/workflows/pr-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
EOF" >> $GITHUB_OUTPUT
- name: "Check PR"
id: check-pr
uses: carpentries/actions/check-valid-pr@main
uses: LearnToDiscover/actions/check-valid-pr@l2d
with:
pr: ${{ github.event.number }}
invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }}
fail_on_error: true
- name: "Comment result of validation"
id: comment-diff
if: ${{ always() }}
uses: carpentries/actions/comment-diff@main
uses: LearnToDiscover/actions/comment-diff@l2d
with:
pr: ${{ github.event.number }}
body: ${{ steps.check-pr.outputs.MSG }}
6 changes: 3 additions & 3 deletions inst/workflows/pr-receive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
echo "${{ steps.hash.outputs.json }}"
- name: "Check PR"
id: check-pr
uses: carpentries/actions/check-valid-pr@main
uses: LearnToDiscover/actions/check-valid-pr@l2d
with:
pr: ${{ github.event.number }}
invalid: ${{ fromJSON(steps.hash.outputs.json)[github.repository] }}
Expand Down Expand Up @@ -76,12 +76,12 @@ jobs:
uses: r-lib/actions/setup-pandoc@v2

- name: "Setup Lesson Engine"
uses: carpentries/actions/setup-sandpaper@main
uses: LearnToDiscover/actions/setup-sandpaper@l2d
with:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: "Setup Package Cache"
uses: carpentries/actions/setup-lesson-deps@main
uses: LearnToDiscover/actions/setup-lesson-deps@l2d
with:
cache-version: ${{ secrets.CACHE_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions inst/workflows/sandpaper-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
uses: browser-actions/[email protected]

- name: "Setup Lesson Engine"
uses: LearnToDiscover/actions/setup-sandpaper@main
uses: LearnToDiscover/actions/setup-sandpaper@l2d
with:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: "Setup Package Cache"
uses: LearnToDiscover/actions/setup-lesson-deps@main
uses: LearnToDiscover/actions/setup-lesson-deps@l2d
with:
cache-version: ${{ secrets.CACHE_VERSION }}

Expand Down
11 changes: 5 additions & 6 deletions inst/workflows/update-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_dispatch:
inputs:
name:
description: 'Who triggered this build (enter github username to tag yourself)?'
description: "Who triggered this build (enter github username to tag yourself)?"
required: true
default: 'monthly run'
default: "monthly run"
schedule:
# Run every tuesday
- cron: '0 0 * * 2'
- cron: "0 0 * * 2"

jobs:
preflight:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
steps:
- name: "validate token"
id: validate
uses: carpentries/actions/check-valid-credentials@main
uses: LearnToDiscover/actions/check-valid-credentials@main
with:
token: ${{ secrets.SANDPAPER_WORKFLOW }}

Expand All @@ -74,7 +74,6 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv/
steps:

- name: "Checkout Lesson"
uses: actions/checkout@v4

Expand All @@ -86,7 +85,7 @@ jobs:

- name: "Update {renv} deps and determine if a PR is needed"
id: update
uses: carpentries/actions/update-lockfile@main
uses: LearnToDiscover/actions/update-lockfile@main
with:
cache-version: ${{ secrets.CACHE_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions inst/workflows/update-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- name: "validate token"
id: validate
uses: carpentries/actions/check-valid-credentials@main
uses: LearnToDiscover/actions/check-valid-credentials@l2d
with:
token: ${{ secrets.SANDPAPER_WORKFLOW }}

Expand All @@ -40,7 +40,7 @@ jobs:

- name: Update Workflows
id: update
uses: carpentries/actions/update-workflows@main
uses: LearnToDiscover/actions/update-workflows@l2d
with:
clean: ${{ github.event.inputs.clean }}

Expand Down

0 comments on commit 4fb5ec7

Please sign in to comment.