From 4d1d6d0fc2bd91706f59dff0af51249e0ea73bc6 Mon Sep 17 00:00:00 2001 From: Megan Davidson <33814653+MDavidson17@users.noreply.github.com> Date: Wed, 27 Mar 2024 08:29:31 +1300 Subject: [PATCH] ci: add skip-argo and skip-sync options [skip-argo] [skip-sync] TDE-1058 (#283) added back the skip steps so that if developers need to make fixes to the repo they have an easy option to do so without accidentally syncing the stac or running argo. Example of an accidental sync: https://github.com/linz/imagery/actions/runs/8413889662/job/23036808911 --- .github/workflows/publish.yml | 2 ++ publish-odr-parameters/README.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0c586365..79b465a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -106,6 +106,7 @@ jobs: - name: Submit Added/Changed Parameter Files id: modified-files + if: ${{ !contains(github.event.head_commit.message, '[skip-argo]')}} run: | # AM = Include: Added, Modified mapfile -d '' modified_parameter_files < <(git diff --name-only --diff-filter=AM -z ${{ github.event.before }} ${{ github.event.after }} -- "publish-odr-parameters/*.yaml") @@ -131,6 +132,7 @@ jobs: # Sync STAC files only on push to 'master' - name: Sync STAC + if: ${{ !contains(github.event.head_commit.message, '[skip-sync]')}} uses: docker://ghcr.io/linz/argo-tasks:v3 with: args: stac-sync /github/workspace/stac/ s3://nz-elevation/ diff --git a/publish-odr-parameters/README.md b/publish-odr-parameters/README.md index 71b0315b..aae1a598 100644 --- a/publish-odr-parameters/README.md +++ b/publish-odr-parameters/README.md @@ -2,6 +2,10 @@ This folder contains the parameter yaml files generated by the `publish-odr` argo workflow. +> [!Tip] +> Add `[skip-argo]` to your PR title/body if you do not want to deploy changes to the ODR +> Add `[skip-sync]` to your PR title/body if you do not want to sync the catalog/collections to the ODR + ## How it Works: ### Step 1: Submit the publish-odr workflow using Argo