Skip to content

Commit 09750dc

Browse files
committed
Reload redirector after we check all mirrors
1 parent 2f137ba commit 09750dc

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/infrastructure-update-redirector-config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,31 @@ jobs:
601601
dl
602602
archive
603603
604+
- name: Install SSH key + known_hosts (task two)
605+
uses: shimataro/ssh-key-action@v2
606+
with:
607+
key: ${{ secrets.KEY_REDI_TASK_ONE }}
608+
known_hosts: ${{ secrets.KNOWN_HOSTS_REDI }}
609+
name: redi_task_one
610+
611+
- name: Reload redirector
612+
shell: bash
613+
env:
614+
REDI_HOST: "redi@${{ secrets.HOST_REDI }}" # e.g. user@host
615+
REDI_PORT: 22 # optional
616+
run: |
617+
set -euo pipefail
618+
PORT="${REDI_PORT:-22}"
619+
: "${REDI_HOST:?Set vars.REDI_HOST (e.g. user@host)}"
620+
ssh \
621+
-i ~/.ssh/redi_task_one \
622+
-p "$PORT" \
623+
-o BatchMode=yes \
624+
-o IdentitiesOnly=yes \
625+
-o StrictHostKeyChecking=yes \
626+
-o UserKnownHostsFile=~/.ssh/known_hosts \
627+
"$REDI_HOST" </dev/null
628+
604629
- name: "Run webindex update action"
605630
uses: peter-evans/repository-dispatch@v4
606631
with:

0 commit comments

Comments
 (0)