Skip to content

update

update #22

Workflow file for this run

name: Upload Individual Artifacts
on:
push:
branches:
- fix/*
jobs:
upload-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare files
# Simulate creating or gathering .tar.gz files in the archive folder
run: |
mkdir -p archive
touch archive/file1.tar.gz archive/file2.tar.gz
echo "File 1" > archive/file1.tar.gz
echo "File 2" > archive/file2.tar.gz
- name: Trigger upload workflow for each file
env:
GH_TOKEN: ${{ github.token }} # Set GH_TOKEN environment variable
run: |
for file in archive/*.tar.gz; do
artifact_name=$(basename "$file" .tar.gz)
echo "Triggering upload for $file as $artifact_name"
# Use gh workflow run with --field
gh workflow run upload_artifacts.yml \
--ref ${{ github.ref_name }} \
-f artifact_name="$artifact_name" \
-field artifact_path="$file"
done