Skip to content

DEV-li191r-parQuantumLine-update-dag #27

DEV-li191r-parQuantumLine-update-dag

DEV-li191r-parQuantumLine-update-dag #27

name: DEV-li191r-parQuantumLine-update-dag
on:
push:
branches:
- 'test.actions'
paths:
- 'pipe/li191r/*.yaml'
- 'pipe/li191r/pipe_list_li191r.txt'
- 'pipe/parQuantumLine/*.yaml'
- 'pipe/parQuantumLine/pipe_list_parQuantumLine.txt'
workflow_dispatch: {} # Allows trigger of workflow from web interface
jobs:
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
outputs:
changed_file_list: ${{ steps.changed-files-list.outputs.changed_file_list }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: jitterbit/get-changed-files@v1
- name: Make list of changed files
id: changed-files-list
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all }}
run: |
file_list=""
for file in $ALL_CHANGED_FILES; do
if [ $file_list ]
then
file_list=$file_list,$file
else
file_list=$file
fi
echo "$file was changed"
done
echo "Full changed file list: $file_list"
echo "changed_file_list=$file_list" >> "$GITHUB_OUTPUT"
update-pipelines:
needs: changed_files
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
env:
PACHD_ADDRESS: grpcs://pachyderm-dev.transitions-nonprod.gcp.neoninternal.org:443
PACH_TOKEN: ${{ secrets.RepoOwnerPachydermDev }}
PATHS: 'pipe/li191r,pipe/parQuantumLine' # Separate multiple with comma (e.g. 'pipe/pqs1,pipe/parWaterSurface'). Order matters.
TRANSACTION: True
UPDATE_SCOPE: changed # 'all' or 'changed'. If not specified, all will be updated. 'changed' will update/create any changed/non-existent pipelines.
CHANGED_FILES: ${{needs.changed_files.outputs.changed_file_list}}
steps:
- uses: actions/checkout@v4
- run: ls -la
- uses: actions/setup-python@v3
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- run: pip install -r .github/workflow_scripts/update_dag_pipelines/requirements.txt
- run: python3 -u .github/workflow_scripts/update_dag_pipelines/update_dag_pipelines.py