-
Notifications
You must be signed in to change notification settings - Fork 23
46 lines (41 loc) · 1.65 KB
/
nightly.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
name: Nightly
# on: push
on:
schedule:
# every night at midnight
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
# uploading master and devel tarballs to web server, for use in subsequent tests
# the base tests that use these uploaded tarballs are the DIRAC "pilot wrapper" tests:
# https://github.com/DIRACGrid/DIRAC/actions?query=workflow%3A%22pilot+wrapper%22
# (triggered by https://github.com/DIRACGrid/DIRAC/blob/integration/.github/workflows/pilotWrapper.yml)
upload:
runs-on: ubuntu-latest
if: github.repository == 'DIRACGrid/Pilot'
strategy:
fail-fast: False
matrix:
branch:
- master
- devel
steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: upload
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.actor }} --password-stdin;
docker pull ghcr.io/diracgrid/management/dirac-distribution:latest
contID=$(docker run -dt ghcr.io/diracgrid/management/dirac-distribution:latest)
docker exec ${contID} mkdir Pilot
docker cp Pilot ${contID}:.
docker cp tests ${contID}:.
docker exec ${contID} bash -c \
"sed -i 's/uploaduser/${{ secrets.KRB_USERNAME }}/g' pilot_tarball_upload.sh && "\
"cat pilot_tarball_upload.sh && "\
"echo ${{ secrets.KRB_PASSWORD }} | kinit ${{ secrets.KRB_USERNAME }}@CERN.CH && "\
"echo readyToUpload && "\
"export USER=${{ secrets.KRB_USERNAME }} && "\
"echo reallyReadyToUpload && "\
"source pilot_tarball_upload.sh ${{ matrix.branch }}"