diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-21 01:38:05 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-21 01:38:05 -0500 |
commit | 9c2c2a152d931147ae18e037cdad39de3427f74a (patch) | |
tree | 214104e2c454185a78612ff30fbf5081e614fecd | |
parent | 20f7f706597c456004dde77dcc1c830d578d2a18 (diff) | |
download | ghasandbox-9c2c2a152d931147ae18e037cdad39de3427f74a.tar.gz |
OK
-rw-r--r-- | .github/workflows/pipeline_index.yml | 10 | ||||
-rw-r--r-- | .github/workflows/pipeline_run.yml | 14 | ||||
-rwxr-xr-x | bin/getfile | 28 |
3 files changed, 46 insertions, 6 deletions
diff --git a/.github/workflows/pipeline_index.yml b/.github/workflows/pipeline_index.yml index ccf36af..c0bc785 100644 --- a/.github/workflows/pipeline_index.yml +++ b/.github/workflows/pipeline_index.yml @@ -16,12 +16,12 @@ on: type: choice description: Mission name (e.g. hst) options: - - thing1 - - thing2 - - thing3 - - thing4 + - hst + - jwst + - roman + - generic required: true - default: "thing4" + default: "generic" build_name: type: string diff --git a/.github/workflows/pipeline_run.yml b/.github/workflows/pipeline_run.yml index 27ceaac..b6a1081 100644 --- a/.github/workflows/pipeline_run.yml +++ b/.github/workflows/pipeline_run.yml @@ -67,6 +67,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Configure PATH + run: | + echo "PATH=${{ github.workspace }}/bin:$PATH" >> $GITHUB_ENV + #- name: Mount data area # uses: ./.github/actions/sshfs # with: @@ -76,6 +80,14 @@ jobs: # remote_dir: /data # local_dir: /mydata + - name: Get delivery file + run: | + src="${{ inputs.delivery_file }}" + dest="${{ runner.temp }}/$(basename $src)" + getfile "$src" "$dest" + echo "DELIVERY_FILE=$dest" >> $GITHUB_ENV + shell: bash + - name: STASIS (${{ runner.os }}-${{ runner.arch }}) uses: ./.github/actions/stasis with: @@ -83,7 +95,7 @@ jobs: artifactory_url: https://blah.tld artifactory_repo: ${{ inputs.artifactory_repo }} stasis_args: ${{ inputs.stasis_args }} - option_delivery_file: ${{ inputs.delivery_file }} + option_delivery_file: ${{ env.DELIVERY_FILE }} option_verbose: ${{ inputs.verbose }} option_continue_on_error: ${{ inputs.continue_on_error }} option_no_testing: ${{ inputs.no_testing }} diff --git a/bin/getfile b/bin/getfile new file mode 100755 index 0000000..d8bcbb6 --- /dev/null +++ b/bin/getfile @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +prog="$(basename $0)" +src="$1" +dest="$2" + +usage() { + echo "$prog {src|url} [dest]" +} + +if [[ -z "$src" ]]; then + usage + exit 1 +fi + +if [[ -z "$dest" ]]; then + dest="./$(basename $src)" +fi + +if [[ "$src" =~ :// ]]; then + cmd=curl + cmd_argv="-L -o $dest $src" +else + cmd=rsync + cmd_argv="-a -P $src $dest" +fi + +echo "$cmd $cmd_argv" |