-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.22 KB
/
test.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
49
50
name: 'Test private repo'
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
schedule:
- cron: '8 17 * * 3' # semi-random time once a week
jobs:
build-base-docker:
uses: manytask/workflows/.github/workflows/reusable-docker-build-push.yml@main
with:
dockerfile: .docker
target: testenv
tags: testenv:${{ github.sha }}
artifact: true
artifact_name: testenv.tar
secrets:
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
check-repo:
needs: [build-base-docker]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Docker Image Artifact
uses: actions/download-artifact@v3
with:
name: testenv.tar
path: /tmp/
- name: Load Docker Image
run: |
docker load --input /tmp/testenv.tar
- name: Check private repo
run: |
# RUN: python -m /opt/checker check -- CODE_DIR"
docker run \
--rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
testenv:${{ github.sha }} \
check /workspace /workspace