Skip to content

Commit

Permalink
merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyhodges committed Dec 17, 2024
2 parents 92a9370 + 9bc5ac5 commit 9e96099
Show file tree
Hide file tree
Showing 26 changed files with 712 additions and 624 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pr-close-signal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ on:
jobs:
send-close-signal:
name: "Send closing signal"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ github.event.action == 'closed' }}
steps:
- name: "Create PRtifact"
run: |
mkdir -p ./pr
printf ${{ github.event.number }} > ./pr/NUM
- name: Upload Diff
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ./pr

11 changes: 5 additions & 6 deletions .github/workflows/pr-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# - no .github files were committed
test-pr:
name: "Test if pull request is valid"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
Expand Down Expand Up @@ -74,15 +74,15 @@ jobs:
create-branch:
name: "Create Git Branch"
needs: test-pr
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
env:
NR: ${{ needs.test-pr.outputs.number }}
permissions:
contents: write
steps:
- name: 'Checkout md outputs'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: md-outputs
path: built
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
comment-pr:
name: "Comment on Pull Request"
needs: [test-pr, create-branch]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
env:
NR: ${{ needs.test-pr.outputs.number }}
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
comment-changed-workflow:
name: "Comment if workflow files have changed"
needs: test-pr
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ always() && needs.test-pr.outputs.is_valid == 'false' }}
env:
NR: ${{ github.event.workflow_run.pull_requests[0].number }}
Expand Down Expand Up @@ -182,4 +182,3 @@ jobs:
with:
pr: ${{ env.NR }}
body: ${{ env.body }}

2 changes: 1 addition & 1 deletion .github/workflows/pr-post-remove-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
delete:
name: "Delete branch from Pull Request"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-preflight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
test-pr:
name: "Test if pull request is valid"
if: ${{ github.event.action != 'closed' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
is_valid: ${{ steps.check-pr.outputs.VALID }}
permissions:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/pr-receive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
test-pr:
name: "Record PR number"
if: ${{ github.event.action != 'closed' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
is_valid: ${{ steps.check-pr.outputs.VALID }}
steps:
Expand All @@ -25,7 +25,7 @@ jobs:
- name: "Upload PR number"
id: upload
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ${{ github.workspace }}/NR
Expand All @@ -48,7 +48,7 @@ jobs:
build-md-source:
name: "Build markdown source files if valid"
needs: test-pr
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -58,10 +58,10 @@ jobs:
MD: ${{ github.workspace }}/site/built
steps:
- name: "Check Out Main Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Check Out Staging Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: md-outputs
path: ${{ env.MD }}
Expand Down Expand Up @@ -107,20 +107,21 @@ jobs:
shell: Rscript {0}

- name: "Upload PR"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr
path: ${{ env.PR }}
overwrite: true

- name: "Upload Diff"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: diff
path: ${{ env.CHIVE }}
retention-days: 1

- name: "Upload Build"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: built
path: ${{ env.MD }}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/sandpaper-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ on:
jobs:
full-build:
name: "Build Full Site"
runs-on: ubuntu-latest

# 2024-10-01: ubuntu-latest is now 24.04 and R is not installed by default in the runner image
# pin to 22.04 for now
runs-on: ubuntu-22.04
permissions:
checks: write
contents: write
Expand All @@ -33,7 +36,7 @@ jobs:
steps:

- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: l10n_main

Expand Down Expand Up @@ -73,4 +76,4 @@ jobs:
translated_dir = lesson_trans_dir, overwrite = TRUE, lang = lang_code,
l10n_branch = NULL, clean = FALSE)
sandpaper:::ci_deploy(path = lesson_trans_dir, reset = reset)
shell: Rscript {0}
shell: Rscript {0}
2 changes: 1 addition & 1 deletion .github/workflows/sandpaper-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.5
0.16.9
12 changes: 6 additions & 6 deletions .github/workflows/update-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
preflight:
name: "Preflight Check"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
ok: ${{ steps.check.outputs.ok }}
steps:
Expand All @@ -36,14 +36,14 @@ jobs:
check_renv:
name: "Check if We Need {renv}"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: preflight
if: ${{ needs.preflight.outputs.ok == 'true'}}
outputs:
needed: ${{ steps.renv.outputs.exists }}
steps:
- name: "Checkout Lesson"
uses: actions/checkout@v3
uses: actions/checkout@v4
- id: renv
run: |
if [[ -d renv ]]; then
Expand All @@ -52,7 +52,7 @@ jobs:
check_token:
name: "Check SANDPAPER_WORKFLOW token"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: check_renv
if: ${{ needs.check_renv.outputs.needed == 'true' }}
outputs:
Expand All @@ -69,14 +69,14 @@ jobs:
name: "Update Package Cache"
needs: check_token
if: ${{ needs.check_token.outputs.repo== 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv/
steps:

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

- name: "Set up R"
uses: r-lib/actions/setup-r@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
check_token:
name: "Check SANDPAPER_WORKFLOW token"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
workflow: ${{ steps.validate.outputs.wf }}
repo: ${{ steps.validate.outputs.repo }}
Expand All @@ -31,12 +31,12 @@ jobs:

update_workflow:
name: "Update Workflow"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: check_token
if: ${{ needs.check_token.outputs.workflow == 'true' }}
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update Workflows
id: update
Expand Down
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by following our [reporting guidelines][coc-reporting].


[coc-reporting]: https://docs.carpentries.org/topic_folders/policies/incident-reporting.html
[coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html
[coc-reporting]: https://docs.carpentries.org/policies/coc/incident-reporting.html
[coc]: https://docs.carpentries.org/policies/coc/
18 changes: 9 additions & 9 deletions episodes/02-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ of configurations we will set as we get started with Git:

On a command line, Git commands are written as `git verb options`,
where `verb` is what we actually want to do and `options` is additional optional information which may be needed for the `verb`. So here is how
Dracula sets up his new laptop:
Alfredo sets up his new laptop:

```bash
$ git config --global user.name "Vlad Dracula"
$ git config --global user.email "[email protected]"
$ git config --global user.name "Alfredo Linguini"
$ git config --global user.email "[email protected]"
```

Please use your own name and email address instead of Dracula's. This user name and email will be associated with your subsequent Git activity,
Please use your own name and email address instead of Alfredo's. This user name and email will be associated with your subsequent Git activity,
which means that any changes pushed to
[GitHub](https://github.com/),
[BitBucket](https://bitbucket.org/),
Expand All @@ -57,7 +57,7 @@ If you elect to use a private email address with GitHub, then use GitHub's no-re

## Line Endings

As with other keys, when you hit <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd> on your keyboard,
As with other keys, when you press <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd> on your keyboard,
your computer encodes this input as a character.
Different operating systems use different character(s) to represent the end of a line.
(You may also hear these referred to as newlines or line breaks.)
Expand All @@ -84,7 +84,7 @@ $ git config --global core.autocrlf true

::::::::::::::::::::::::::::::::::::::::::::::::::

Dracula also has to set his favorite text editor, following this table:
Alfredo also has to set his favorite text editor, following this table:

| Editor | Configuration command |
| :----------- | :------------------------------ |
Expand All @@ -111,14 +111,14 @@ It is possible to reconfigure the text editor for Git whenever you want to chang
## Exiting Vim

Note that Vim is the default editor for many programs. If you haven't used Vim before and wish to exit a session without saving
your changes, press <kbd>Esc</kbd> then type `:q!` and hit <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd>.
If you want to save your changes and quit, press <kbd>Esc</kbd> then type `:wq` and hit <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd>.
your changes, press <kbd>Esc</kbd> then type `:q!` and press <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd>.
If you want to save your changes and quit, press <kbd>Esc</kbd> then type `:wq` and press <kbd>Enter</kbd> or <kbd>↵</kbd> or on Macs, <kbd>Return</kbd>.


::::::::::::::::::::::::::::::::::::::::::::::::::

Git (2.28+) allows configuration of the name of the branch created when you
initialize any new repository. Dracula decides to use that feature to set it to `main` so
initialize any new repository. Alfredo decides to use that feature to set it to `main` so
it matches the cloud service he will eventually use.

```bash
Expand Down
Loading

0 comments on commit 9e96099

Please sign in to comment.