Skip to content

Create single-sca-auth-workflow.yml #1

Create single-sca-auth-workflow.yml

Create single-sca-auth-workflow.yml #1

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