From 83ccb4da8606b3a66ac59ec529c931b38dff8842 Mon Sep 17 00:00:00 2001 From: Scott Henderson Date: Tue, 16 Jan 2024 13:25:11 -0800 Subject: [PATCH] custom workflow, upload zip to github --- .github/workflows/singleburst.yml | 8 ++- .github/workflows/singleburst_custom.yml | 67 ++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/singleburst_custom.yml diff --git a/.github/workflows/singleburst.yml b/.github/workflows/singleburst.yml index bc3513a..5d702f2 100644 --- a/.github/workflows/singleburst.yml +++ b/.github/workflows/singleburst.yml @@ -45,4 +45,10 @@ jobs: --looks 20x4 \ --apply-water-mask False \ --bucket fufiters \ - --bucket-prefix S1_136231_IW2/20200604_20200616 \ No newline at end of file + --bucket-prefix S1_136231_IW2/20200604_20200616 + + - name: Upload Hyp3 Output + uses: actions/upload-artifact@v4 + with: + name: hyp3-isce2 + path: S1*.zip \ No newline at end of file diff --git a/.github/workflows/singleburst_custom.yml b/.github/workflows/singleburst_custom.yml new file mode 100644 index 0000000..79f57fb --- /dev/null +++ b/.github/workflows/singleburst_custom.yml @@ -0,0 +1,67 @@ +name: SingleBurstCustom + +on: + workflow_dispatch: + inputs: + reference: + type: string + required: true + description: reference burst + default: S1_136231_IW2_20200604T022312_VV_7C85-BURST + secondary: + type: string + required: true + description: secondary burst + default: S1_136231_IW2_20200616T022313_VV_5D11-BURST + +# TODO: parse inputs for dates to use in bucket-prefix + +jobs: + hyp3-isce2: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + repository: 'ASFHyP3/hyp3-isce2' + + - name: Install Conda environment with Micromamba + uses: mamba-org/setup-micromamba@v1 + with: + cache-environment: true + environment-file: environment.yml + + - name: Development install + run: pip install -e . + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: Run Example Workflow + env: + EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }} + EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD}} + ESA_USERNAME: ${{ secrets.ESA_USERNAME }} + ESA_PASSWORD: ${{ secrets.ESA_PASSWORD}} + run: | + python -m hyp3_isce2 ++process insar_tops_burst \ + ${{ inputs.reference }} \ + ${{ inputs.secondary }} \ + --looks 20x4 \ + --apply-water-mask False \ + --bucket fufiters \ + --bucket-prefix singleburst_custom + + - name: Upload Hyp3 Output + uses: actions/upload-artifact@v4 + with: + name: hyp3-isce2 + path: S1*.zip \ No newline at end of file