Skip to content

Commit d4c2952

Browse files
authored
Shellcheck fix backuprestore.yml
1 parent 70cb0b0 commit d4c2952

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/backuprestore.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
build:
2929
runs-on: ubuntu-latest
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
with:
3333
repository: github/backup-utils-private
3434
ref: ${{ inputs.ref }}
@@ -51,13 +51,13 @@ jobs:
5151
run: docker load -i backup-utils.tar
5252
- uses: actions/checkout@v3
5353
- name: Create backup directory
54-
run: mkdir $HOME/ghe-backup-data
54+
run: mkdir "$HOME"/ghe-backup-data
5555
- name: set up ssh SSH_KEY
56-
run: echo -e "${SSH_KEY}\n" > $HOME/backup
56+
run: echo -e "${SSH_KEY}\n" > "$HOME"/backup
5757
- name: set up ssh key permissions
58-
run: chmod 0600 $HOME/backup
58+
run: chmod 0600 "$HOME"/backup
5959
- name: change version
60-
run: echo "3.8.0" > $HOME/version
60+
run: echo "3.8.0" > "$HOME"/version
6161
- name: Perform backup
6262
run: |
6363
docker run -e "GHE_HOSTNAME=${{ inputs.hostname }}" \
@@ -70,7 +70,7 @@ jobs:
7070
--rm \
7171
backup-utils ghe-backup
7272
- name: Prepare for restore
73-
run: ssh -p122 -i $HOME/backup -o StrictHostKeyChecking=no admin@${{ inputs.hostname }} "ghe-maintenance -s"
73+
run: ssh -p122 -i "$HOME"/backup -o StrictHostKeyChecking=no admin@${{ inputs.hostname }} "ghe-maintenance -s"
7474
- name: Restore data to instance
7575
run: |
7676
docker run -e "GHE_HOSTNAME=${{ inputs.hostname }}" \
@@ -83,5 +83,5 @@ jobs:
8383
--rm \
8484
backup-utils ghe-restore ${{ inputs.hostname }}
8585
- name: Reset maintenance mode after restore
86-
run: ssh -p122 -i $HOME/backup -o StrictHostKeyChecking=no admin@${{ inputs.hostname }} "ghe-maintenance -u"
86+
run: ssh -p122 -i "$HOME"/backup -o StrictHostKeyChecking=no admin@${{ inputs.hostname }} "ghe-maintenance -u"
8787

0 commit comments

Comments
 (0)