Skip to content

Commit

Permalink
Create single-sca-auth-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1867 authored Nov 27, 2024
1 parent e8f08cf commit 24e1ff8
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/single-sca-auth-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 24e1ff8

Please sign in to comment.