From ef06260266428df64b3bc7163cb86454fa1dc90e Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Tue, 8 Sep 2020 11:52:01 -0400 Subject: [PATCH] ci(rtd): update to trigger rtd build (#25) --- .github/workflows/ex-nightly.yml | 37 +++++++++++++++++--------------- .github/workflows/ex-rtd.yml | 7 +++--- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ex-nightly.yml b/.github/workflows/ex-nightly.yml index 4b00b9bbc..fa744c331 100644 --- a/.github/workflows/ex-nightly.yml +++ b/.github/workflows/ex-nightly.yml @@ -27,6 +27,23 @@ jobs: echo ${{ github.repository }} echo ${{ github.ref }} + - name: Get Current Time + uses: 1466587594/get-current-time@v2.0.0 + id: current-time + with: + format: MM/DD/YYYY HH:mm + + - name: Set current time as environmental variable + env: + TIME: "${{ steps.current-time.outputs.time }}" + F_TIME: "${{ steps.current-time.outputs.formattedTime }}" + run: | + echo "::set-env name=F_TIME::${{ steps.current-time.outputs.formattedTime }}" + echo "::set-env name=TIME::${{ steps.current-time.outputs.time }}" + echo $TIME + echo $F_TIME + echo "MODFLOW 6 examples: built at ${F_TIME}" + - name: Setup symbolic link to gfortran run: | sudo ln -fs /usr/bin/gfortran-9 /usr/local/bin/gfortran @@ -141,7 +158,8 @@ jobs: ls -la ./ - name: Upload build artifacts for latest release - if: github.repository_owner == 'MODFLOW-USGS' && github.ref == 'refs/heads/master' + if: + github.repository_owner == 'MODFLOW-USGS' && github.ref == 'refs/heads/master' uses: actions/upload-artifact@v2 with: name: latest @@ -169,27 +187,12 @@ jobs: pwd ls -l ./latest/ - - name: Get Current Time - uses: 1466587594/get-current-time@v2.0.0 - id: current-time - with: - format: MM/DD/YYYY HH - - - name: Set current time as environmental variable - env: - TIME: "${{ steps.current-time.outputs.time }}" - F_TIME: "${{ steps.current-time.outputs.formattedTime }}" - run: | - echo "::set-env name=F_TIME::${{ steps.current-time.outputs.formattedTime }}" - echo "::set-env name=TIME::${{ steps.current-time.outputs.time }}" - echo $TIME $F_TIME - - name: Create a Release uses: ncipollo/release-action@v1 with: tag: latest name: latest build - body: "MODFLOW 6 examples: built at $F_TIME" + body: "MODFLOW 6 examples: built at ${F_TIME}" allowUpdates: true draft: false token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ex-rtd.yml b/.github/workflows/ex-rtd.yml index 991208bd0..b0f5b1885 100644 --- a/.github/workflows/ex-rtd.yml +++ b/.github/workflows/ex-rtd.yml @@ -8,7 +8,7 @@ on: jobs: rtd_build: - name: latest-build + name: rtd-build runs-on: ubuntu-latest strategy: fail-fast: false @@ -131,12 +131,11 @@ jobs: # trigger rtd if previous job was successful rtd: - name: Read the Docs trigger + name: rtd-trigger needs: rtd_build runs-on: ubuntu-latest - if: - github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' + if: github.repository_owner == 'MODFLOW-USGS' && github.event_name == 'push' steps: - name: Trigger RTDs build on master and develop branches uses: dfm/rtds-action@v1.0.0