|
| 1 | +# Process a single image pair |
| 2 | +name: Single |
| 3 | +run-name: ${{ inputs.workflow_name }} |
| 4 | + |
| 5 | +# Set workflow input parameters and defaults |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + img1_date: |
| 10 | + type: string |
| 11 | + required: true |
| 12 | + description: S2 image 1 date |
| 13 | + default: 2022-06-24 |
| 14 | + img2_date: |
| 15 | + type: string |
| 16 | + required: true |
| 17 | + description: S2 image 2 date |
| 18 | + default: 2022-09-27 |
| 19 | + workflow_name: |
| 20 | + description: 'Custom workflow name' |
| 21 | + required: false |
| 22 | + default: 'autoRIFT' |
| 23 | + type: string |
| 24 | + |
| 25 | + # Must duplicate inputs for workflow_call (https://github.com/orgs/community/discussions/39357) |
| 26 | + workflow_call: |
| 27 | + inputs: |
| 28 | + img1_date: |
| 29 | + type: string |
| 30 | + description: S2 image 1 date |
| 31 | + img2_date: |
| 32 | + type: string |
| 33 | + description: S2 image 2 date |
| 34 | + workflow_name: |
| 35 | + description: 'Custom workflow name' |
| 36 | + type: string |
| 37 | + |
| 38 | +jobs: |
| 39 | + autoRIFT: |
| 40 | + name: ${{ inputs.workflow_name }} |
| 41 | + runs-on: ubuntu-latest |
| 42 | + defaults: |
| 43 | + run: |
| 44 | + shell: bash -el {0} |
| 45 | + |
| 46 | + steps: |
| 47 | + - name: Checkout Repository |
| 48 | + uses: actions/checkout@v4 |
| 49 | + |
| 50 | + - name: Install Conda environment with Micromamba |
| 51 | + uses: mamba-org/setup-micromamba@v1 |
| 52 | + with: |
| 53 | + cache-environment: true |
| 54 | + environment-file: glacier_image_correlation/environment.yml |
| 55 | + environment-name: image-correlation |
| 56 | + |
| 57 | + - name: download data and run autoRIFT software |
| 58 | + run: | |
| 59 | + python glacier_image_correlation/image_correlation.py \ |
| 60 | + ${{ inputs.img1_date }} \ |
| 61 | + ${{ inputs.img2_date }} |
| 62 | +
|
| 63 | + - name: Upload velocity |
| 64 | + uses: actions/upload-artifact@v4 |
| 65 | + with: |
| 66 | + name: ${{ inputs.workflow_name }} |
| 67 | + path: | |
| 68 | + glacier_image_correlation/glacier_velocity/S2*.tif |
0 commit comments