forked from DIRACGrid/DIRAC
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.28 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
# This workflow runs every 24 hours for the following purpose:
#
# - Create + upload *integration* + *master* tarball
#
# All created images are then uploaded to GitHub packages
name: Nightlies
# on: push
on:
schedule:
# every day at 6 am (so that the master of DIRACOS is already created)
- cron: '0 6 * * *'
jobs:
# running dirac-distribution in the proper image
dirac-distribute:
runs-on: ubuntu-latest
if: github.repository == 'DIRACGrid/DIRAC'
strategy:
fail-fast: False
matrix:
branch:
- master
- integration
steps:
- uses: actions/checkout@v3
- name: create
run: |
docker pull ghcr.io/diracgrid/management/dirac-distribution:latest
docker run ghcr.io/diracgrid/management/dirac-distribution:latest bash -c \
"python3 dirac-distribution.py -r ${{ matrix.branch }} | tail -n 1 > /tmp/deploy.sh && "\
"sed -i 's/lhcbprod/${{ secrets.KRB_USERNAME }}/g' /tmp/deploy.sh && "\
"cat /tmp/deploy.sh && "\
"echo ${{ secrets.KRB_PASSWORD }} | kinit ${{ secrets.KRB_USERNAME }}@CERN.CH && "\
"echo readyToUpload && "\
"export USER=${{ secrets.KRB_USERNAME }} && "\
"echo reallyReadyToUpload && "\
"source /tmp/deploy.sh"