Skip to content

Merge pull request #549 from NEONScience/cron.daily.faster #82

Merge pull request #549 from NEONScience/cron.daily.faster

Merge pull request #549 from NEONScience/cron.daily.faster #82

name: DEV-prt-tempProducts-update-dag
on:
push:
branches:
- 'master'
paths:
- 'pipe/prt/*.yaml'
- 'pipe/prt/pipe_list_prt.txt'
- 'pipe/tempSoil/*.yaml'
- 'pipe/tempSoil/pipe_list_tempSoil.txt'
- 'pipe/tempSurfacewater/*.yaml'
- 'pipe/tempSurfacewater/pipe_list_tempSurfacewater.txt'
- 'pipe/tempAirSingle/*.yaml'
- 'pipe/tempAirSingle/pipe_list_tempAirSingle.txt'
workflow_dispatch: {} # Allows trigger of workflow from web interface
jobs:
# -------------------------------------------------------------
# Using GitHub's API is not supported for push events
# -------------------------------------------------------------
#
# ----------------------------------------------------------------------------------------------
# Using local .git history
# ----------------------------------------------------------------------------------------------
# Event `push`: Compare the preceding remote commit -> to the current commit of the main branch
# ----------------------------------------------------------------------------------------------
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
outputs:
# Use this changed_file_list if you plan to use get-changed-files-action
changed_file_list: ${{ steps.changed-files-action.outputs.changed_file_list }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
# Using get-changed-files-action
- name: Get changed files action
id: changed-files-action
uses: ./.github/actions/get-changed-files
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/prt,pipe/tempSoil,pipe/tempSurfacewater' # 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
- name: Update pipelines
uses: ./.github/actions/update-pipelines
with:
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
paths: ${{ env.PATHS }}
transaction: ${{ env.TRANSACTION }}
update_scope: ${{ env.UPDATE_SCOPE }}
changed_files: ${{ env.CHANGED_FILES }}