forked from perfsonar/sca-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (72 loc) · 2.77 KB
/
single-sca-auth-workflow.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: single-sca-auth-workflow
on:
push:
branches:
- github-workflow
env:
BUILD_OS: u20
jobs:
sca-auth-daemon:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Check out Repo
uses: actions/checkout@v4
with:
ref: 5.2.0
# Fetch workflow script from projects
- name: Fetch workflow script from projects
env:
github-token: ${{ secrets.GIT_ACTIONS }}
run: |
git clone https://github.com/cs1867/project.git project
case "${{ env.BUILD_OS }}" in
'ol8'|'el9')
cp project/toolbox/workflows/github-el-workflow.sh .
;;
'd11'|'d12'|'u20'|'u24')
cp project/toolbox/workflows/github_u20_workflow.sh .
;;
esac
# Download artifacts
- name: Download artifacts
run: |
mkdir -p artifacts
echo "Downloading artifact for pscheduler"
echo "Run ID: 12052329501"
gh run download 12052329501 --repo cs1867/pscheduler -D artifacts/pscheduler --name "pscheduler-${{ env.BUILD_OS }}"
artifact_path="artifacts/pscheduler"
echo "Listing artifact path:"
ls -al "$artifact_path"
echo "Downloading artifact for perl-shared"
echo "Run ID: 12052703124"
gh run download 12052703124 --repo cs1867/perl-shared -D artifacts/perl-shared --name "perl-shared-${{ env.BUILD_OS }}"
artifact_path="artifacts/perl-shared"
echo "Listing artifact path:"
ls -al "$artifact_path"
echo "Downloading artifact for psconfig"
echo "Run ID: 12055839122"
gh run download 12055839122 --repo cs1867/psconfig -D artifacts/psconfig --name "psconfig-${{ env.BUILD_OS }}"
artifact_path="artifacts/psconfig"
echo "Listing artifact path:"
ls -al "$artifact_path"
env:
GITHUB_TOKEN: ${{ secrets.GIT_ACTIONS }}
# Run docker oneshot builder and workflow script
- name: Run Docker oneshot builder
run: |
case "${{ env.BUILD_OS }}" in
'ol8'|'el9')
curl -s https://raw.githubusercontent.com/perfsonar/docker-oneshot-builder/main/build | sh -s - --run github-el-workflow.sh . '${{ env.BUILD_OS }}'
;;
'd11'|'d12'|'u20'|'u24')
curl -s https://raw.githubusercontent.com/perfsonar/docker-oneshot-builder/main/build | sh -s - --run github_u20_workflow.sh . '${{ env.BUILD_OS }}'
;;
esac
# Upload artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ env.BUILD_OS }}
path: unibuild-repo
retention-days: 5