-
Notifications
You must be signed in to change notification settings - Fork 22
48 lines (41 loc) · 1.16 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ '*' ]
workflow_dispatch: {}
schedule:
- cron: '30 23 1 * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 50 # the same value as Travis CI
- name: Run build script
run: |
python3 configure.py
make all
env:
COMMIT_FROM: ${{ github.event.before }}
COMMIT_TO: ${{ github.event.after }}
- name: Test Rsync container
run: |
docker run --rm -t \
--name=syncing-ubuntu \
-e RSYNC_HOST=rsync.archive.ubuntu.com \
-e RSYNC_PATH=ubuntu/ \
-e RSYNC_EXTRA='--dry-run --no-r --dirs' \
-e RSYNC_FILTER='- .trace' \
--tmpfs /data \
--tmpfs /log \
ustcmirror/rsync
- name: Deploy
if: "github.ref == 'refs/heads/master' && github.repository == 'ustclug/ustcmirror-images'"
run: ./push.sh
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}