Skip to content

Commit 91e6c6c

Browse files
committed
Testing this initial portion of the workflow
1 parent e453b40 commit 91e6c6c

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/restore.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Restore Dataset
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
size:
7+
description: 'Size of the dataset to restore'
8+
required: true
9+
type: choice
10+
default: 'small'
11+
options:
12+
- 'small'
13+
- 'medium'
14+
hostname:
15+
description: 'Hostname of the server'
16+
required: true
17+
type: string
18+
ref:
19+
description: 'Branch ref to use'
20+
required: false
21+
type: string
22+
default: 'master'
23+
workflow_call:
24+
inputs:
25+
size:
26+
description: 'Size of the dataset to restore'
27+
required: true
28+
type: string
29+
default: 'small'
30+
hostname:
31+
description: 'Hostname of the server'
32+
required: true
33+
type: string
34+
ref:
35+
description: 'Branch ref to use'
36+
required: false
37+
type: string
38+
default: 'master'
39+
jobs:
40+
build:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v3
44+
with:
45+
repository: github/backup-utils-private
46+
ref: ${{ inputs.ref }}
47+
- run: docker build . --file Dockerfile --tag backup-utils
48+
- run: docker save backup-utils -o backup-utils.tar
49+
- uses: actions/upload-artifact@v3
50+
with:
51+
name: backup-utils
52+
path: backup-utils.tar
53+
restore:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
env:
57+
SSH_KEY: ${{ secrets.BACKUP_SSH_KEY }}
58+
steps:
59+
- uses: actions/download-artifact@v3
60+
with:
61+
name: backup-utils
62+
- name: Load docker container
63+
run: docker load -i backup-utils.tar
64+
- uses: actions/checkout@v3
65+
with:
66+
repository: github/ghes-data
67+
ref: main
68+
- run: gunzip ghes-data/data/backup/${{ inputs.size }}/${{ inputs.size }}.zip
69+
- run: ls -al ghes-data/data/backup/${{ inputs.size }}
70+
71+
72+
73+

0 commit comments

Comments
 (0)