Skip to content

Commit 9040cfb

Browse files
committed
🔄 Synced local '.github/workflows/' with remote '.github/workflows/'
release-null
1 parent 21c2d92 commit 9040cfb

4 files changed

Lines changed: 29 additions & 89 deletions

File tree

‎.github/workflows/delete-preview.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
# Check out current repository
2020
- name: checkout
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222
with:
2323
fetch-depth: 0
2424

‎.github/workflows/pull_request.yml‎

Lines changed: 16 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Candace Savonen Aug 2022
1+
# Candace Savonen 2021
2+
# Updated Jan 2023
23

34
name: Pull Request
45

@@ -13,7 +14,7 @@ jobs:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout
16-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1718
with:
1819
fetch-depth: 0
1920

@@ -23,14 +24,6 @@ jobs:
2324
with:
2425
files: config_automation.yml # Pass a space-separated list of configuration files. Rightmost files take precedence.
2526

26-
- name: Verify Dockerfiles changed?
27-
uses: tj-actions/verify-changed-files@v8.8
28-
id: verify-changed-files
29-
with:
30-
files: |
31-
docker/Dockerfile
32-
docker/github_package_list.tsv
33-
3427
# Delete the branch if this has been run before
3528
- name: Delete branch locally and remotely
3629
run: git push origin --delete preview-${{ github.event.pull_request.number }} || echo "No branch to delete"
@@ -53,9 +46,7 @@ jobs:
5346
toggle_url_check: "${{ env.URL_CHECKER }}"
5447
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}"
5548
toggle_render_preview: "${{ env.RENDER_PREVIEW }}"
56-
toggle_docker_build: "${{ env.DOCKER_BUILD }}"
5749
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"
58-
dockerfiles_changed: steps.verify-changed-files.outputs.files_changed
5950

6051
########################## Make the error reports ##############################
6152
spell-check:
@@ -99,7 +90,7 @@ jobs:
9990

10091
steps:
10192
- name: Checkout files
102-
uses: actions/checkout@v2
93+
uses: actions/checkout@v3
10394
with:
10495
fetch-depth: 0
10596

@@ -108,6 +99,7 @@ jobs:
10899

109100
- name: Commit styled files
110101
run: |
102+
git config --system --add safe.directory "$GITHUB_WORKSPACE"
111103
git add \*.Rmd
112104
git commit -m 'Style Rmds' || echo "No changes to commit"
113105
git push origin || echo "No changes to commit"
@@ -124,13 +116,14 @@ jobs:
124116

125117
steps:
126118
- name: Checkout files
127-
uses: actions/checkout@v2
119+
uses: actions/checkout@v3
128120
with:
129121
fetch-depth: 0
130122

131123
# Set up git checkout
132124
- name: Set up git checkout
133125
run: |
126+
git config --system --add safe.directory "$GITHUB_WORKSPACE"
134127
git config --local user.email "itcrtrainingnetwork@gmail.com"
135128
git config --local user.name "jhudsl-robot"
136129
@@ -167,15 +160,15 @@ jobs:
167160
run: |
168161
branch_name='preview-${{ github.event.pull_request.number }}'
169162
git diff origin/main -- docs >/dev/null && changes=true || changes=false
170-
echo ::set-output name=changes::$changes
163+
echo "changes=$changes" >> $GITHUB_OUTPUT
171164
git add . --force
172165
git commit -m 'Render preview' || echo "No changes to commit"
173166
git pull --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours
174167
git push --force || echo "No changes to commit"
175168
shell: bash
176169

177170
- name: Find Comment
178-
uses: peter-evans/find-comment@v1
171+
uses: peter-evans/find-comment@v2
179172
id: fc
180173
with:
181174
issue-number: ${{ github.event.pull_request.number }}
@@ -189,16 +182,16 @@ jobs:
189182
bookdown_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html")
190183
tocless_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/no_toc/index.html")
191184
docx_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/docs/$course_name.docx")
192-
echo ::set-output name=bookdown_link::$bookdown_link
193-
echo ::set-output name=tocless_link::$tocless_link
194-
echo ::set-output name=docx_link::$docx_link
195-
echo ::set-output name=time::$(date +'%Y-%m-%d')
196-
echo ::set-output name=commit_id::$GITHUB_SHA
185+
echo "bookdown_link=$bookdown_link" >> $GITHUB_OUTPUT
186+
echo "tocless_link=$tocless_link" >> $GITHUB_OUTPUT
187+
echo "docx_link=$docx_link" >> $GITHUB_OUTPUT
188+
echo "time=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
189+
echo "commit_id=$GITHUB_SHA" >> $GITHUB_OUTPUT
197190
echo ${{steps.commit.outputs.changes}}
198191
199192
- name: Create or update comment
200193
if: steps.commit.outputs.changes == 'true'
201-
uses: peter-evans/create-or-update-comment@v1
194+
uses: peter-evans/create-or-update-comment@v2
202195
with:
203196
comment-id: ${{ steps.fc.outputs.comment-id }}
204197
issue-number: ${{ github.event.pull_request.number }}
@@ -213,7 +206,7 @@ jobs:
213206

214207
- name: Comment if no changes
215208
if: steps.commit.outputs.changes == 'false'
216-
uses: peter-evans/create-or-update-comment@v1
209+
uses: peter-evans/create-or-update-comment@v2
217210
with:
218211
comment-id: ${{ steps.fc.outputs.comment-id }}
219212
issue-number: ${{ github.event.pull_request.number }}
@@ -222,56 +215,3 @@ jobs:
222215
223216
_Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
224217
edit-mode: replace
225-
226-
############################## Build Docker ####################################
227-
228-
build-docker:
229-
name: Build Docker image
230-
needs: yaml-check
231-
runs-on: ubuntu-latest
232-
if: ${{needs.yaml-check.outputs.toggle_docker_build == 'yes' && needs.yaml-check.outputs.dockerfiles_changed == 'true' && github.head_ref != 'repo-sync/OTTR_Template/default'}}
233-
234-
steps:
235-
- name: checkout repo
236-
uses: actions/checkout@v2
237-
238-
- name: Verify Dockerfiles changed?
239-
uses: tj-actions/verify-changed-files@v8.8
240-
id: verify-changed-files
241-
with:
242-
files: |
243-
docker/Dockerfile
244-
docker/github_package_list.tsv
245-
246-
- name: Login as jhudsl-robot
247-
run: |
248-
git config --local user.email "itcrtrainingnetwork@gmail.com"
249-
git config --local user.name "jhudsl-robot"
250-
251-
# Set up Docker build
252-
- name: Set up Docker Buildx
253-
uses: docker/setup-buildx-action@v1
254-
255-
# Setup layer cache
256-
- name: Cache Docker layers
257-
uses: actions/cache@v2
258-
with:
259-
path: /tmp/.buildx-cache
260-
key: ${{ runner.os }}-buildx-${{ github.sha }}
261-
restore-keys: |
262-
${{ runner.os }}-buildx-
263-
264-
- name: Set up Docker Build
265-
uses: docker/setup-buildx-action@v1
266-
267-
- name: Get token
268-
run: echo ${{ secrets.GH_PAT }} > docker/git_token.txt
269-
270-
- name: Build Docker image
271-
uses: docker/build-push-action@v2
272-
with:
273-
push: false
274-
load: true
275-
context: docker
276-
file: docker/Dockerfile
277-
tags: jhudsl/base_ottr

‎.github/workflows/render-all.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

2323
# Use the yaml-env-action action.
2424
- name: Load environment from YAML
@@ -42,14 +42,14 @@ jobs:
4242

4343
steps:
4444
- name: checkout
45-
uses: actions/checkout@v2
45+
uses: actions/checkout@v3
4646
with:
4747
fetch-depth: 0
4848
token: ${{ secrets.GH_PAT }}
4949

5050
- name: Login as jhudsl-robot
5151
run: |
52-
52+
git config --system --add safe.directory "$GITHUB_WORKSPACE"
5353
git config --local user.email "itcrtrainingnetwork@gmail.com"
5454
git config --local user.name "jhudsl-robot"
5555
@@ -93,7 +93,7 @@ jobs:
9393

9494
steps:
9595
- name: checkout
96-
uses: actions/checkout@v2
96+
uses: actions/checkout@v3
9797
with:
9898
fetch-depth: 0
9999
token: ${{ secrets.GH_PAT }}
@@ -130,7 +130,7 @@ jobs:
130130

131131
steps:
132132
- name: checkout
133-
uses: actions/checkout@v2
133+
uses: actions/checkout@v3
134134
with:
135135
fetch-depth: 0
136136
token: ${{ secrets.GH_PAT }}
@@ -197,7 +197,7 @@ jobs:
197197

198198
steps:
199199
- name: checkout
200-
uses: actions/checkout@v2
200+
uses: actions/checkout@v3
201201
with:
202202
fetch-depth: 0
203203
token: ${{ secrets.GH_PAT }}

‎.github/workflows/transfer-rendered-files.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525

2626
# Use the yaml-env-action action.
2727
- name: Load environment from YAML
@@ -60,12 +60,12 @@ jobs:
6060
results=$(Rscript --vanilla git_repo_check.R --repo "$GITHUB_REPOSITORY" --git_pat "$GH_PAT")
6161
echo $QUIZ_REPO exists: $results
6262
63-
echo "::set-output name=git_results::$results"
64-
echo "::set-output name=leanpub_repo::$QUIZ_REPO"
63+
echo "git_results=$results" >> $GITHUB_OUTPUT
64+
echo "leanpub_repo=$QUIZ_REPO" >> $GITHUB_OUTPUT
6565
6666
- name: Checkout code from Leanpub repo
6767
if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }}
68-
uses: actions/checkout@v2
68+
uses: actions/checkout@v3
6969
with:
7070
repository: ${{ steps.git_repo_check.outputs.leanpub_repo }}
7171
token: ${{ secrets.GH_PAT }}
@@ -79,9 +79,9 @@ jobs:
7979
# Copy over images folder
8080
svn export --force https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_REF#refs/heads/}/resources/chapt_screen_images resources/chapt_screen_images
8181
82-
# Copy over _bookdown.yml
82+
# Copy over _bookdown.yml
8383
svn export --force https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_REF#refs/heads/}/_bookdown.yml _bookdown.yml
84-
84+
8585
- name: Create PR with resources files
8686
if: ${{ steps.git_repo_check.outputs.git_results == 'TRUE' }}
8787
uses: peter-evans/create-pull-request@v3

0 commit comments

Comments
 (0)